iphone

can I put a scrollable text field on a uialertview?

I am needing to alert something for an answer for a trivia game iOS app I am writing. I have an alert view that pops up and shows a scrollable uitextview...is Apple going to ding me for that? What are my options for showing large amounts of text in my alert? Thanks!! ...

iphone camera - use imac webcam instead?

Hello Can I not somehow use the built in webcam on my imac to test camera functions in the simulator? Thanks Tom ...

how do you register a protocol for your iphone app?

So that clicking an url like this app://file1.html on the iphone will open your app? ...

iphone uiscrollview - custom paging distance

I have a long UIScrollView that I want to page through by a variable amount (I have images of different widths that I want to center on screen as the user scrolls through with paging enabled: From the UIScrollView Class Reference for pagingEnabled: the scroll view stops on multiples of the view bounds when the user scrolls. So I guess ...

Why is my UIView unresponsive after a reload?

I have a viewController that pops a modal view with a UIWebView. If I visit a particularly heavy page, I start getting memory warnings, followed by the parent view getting unloaded. This is all fine and dandy, but when I close the modal view, my parent reloads (as expected) but is not longer able to process any touch events. The app re...

Changing the navigationBar on pushViewController:

In my tabBar based app I have subclassed the UINavigationBar. Let's say I have three of them: BlueNavBar, BlackNavBar and RedNavBar. It looks something like this: //BlueNavBar.m - (void)drawRect:(CGRect)rect { self.tintColor = [UIColor colorWithRed:65.0f/255.0f green:(156.0f/255.0f) blue:(215.0f/255.0f) alpha...

Always getting the same height using sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:

The CGSize returned by sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode: contains always the same height. Why is that, and is there a way around this? I want to align a string vertically and it may not be truncated, unless it can't fit on a single line using the minimum font size. So I try to use this method to get the lin...

Loading UIImagePickerController view at runtime

I am currently writing a program where if a certain condition is true, it should load a modal UIImagePicker camera view. I declared the UIImagePickerDelegate in the ViewController for the application. However when the program is instructed to load the modal camera view the camera view will appear but the screen is just black and the canc...

iPhone apps: Linking to review page

I've seen several many apps link to the "write a review" page on the app store. What URL are they using? I know it's a Phobos URL. Thanks. ...

How to scale up and crop a UIImage?

Here's the code I have but it's crashing ... any ideas? UIImage *tempImage = [[UIImage alloc] initWithData:imageData]; CGImageRef imgRef = [tempImage CGImage]; [tempImage release]; CGFloat width = CGImageGetWidth(imgRef); CGFloat height = CGImageGetHeight(imgRef); CGRect bounds = CGRectMake(0, 0, width, height); CGSize size = bou...

When using up/down buttons in a Detail View, then go back to Table View, how to do I get the table view to emerge at the correct menu item?

In my iPhone app, I have a table view. In that menu, when you select a row, it pushes detail view (a UIViewController). The detail view has up/down buttons so that you can go backwards and forwards through the menu items without having to back out into the table view. If I advance to a different item using the up/down buttons in detai...

UILabel with some effects

Hi, Can anyone help me how could I achieve an effect like this image sample image on a UILabel. As you can see there some like a stroke/bevel effect on the label. I got this image from a clock app so it means that its not a static image. Thanks in advance.. ...

How do I include libxslt in my iPhone app?

I've heard that including libxslt.dylib is grounds for getting your app rejected. I don't know how accurate that is. Nevertheless, I would like to include the latest version of libxslt. I'd like to do the same thing with libxml2, as well as other libraries in the future. What is the correct way to include a code library like this in my...

How do I show a modalviewcontroller well in a tableview

I need to show a modal view controller when users click a info button on the top right of my application. ...

Percentage Calculation always returns 0

I am trying to calculate the percentage of something. It's simple maths. Here is the code. float percentComplete = 0; if (todaysCollection>0) { percentComplete = ((float)todaysCollection/(float)totalCollectionAvailable)*100; } Here the value of todaysCollection is 1751 and totalCollectionAvailable is 4000. Both are int. But percen...

How to stop text in a UITableViewCell running into the area used by the disclosure indicator?

I am display some long text in a cell, and resizing the height of the cell using heightForRowAtIndexPath. However, when the text is displayed it is running into the area used by the (blank) disclosure indicator. When such a row is selected, and the checkmark is displayed, the text reformats itself to not use the indicator area, causing...

Why am I seeing a black screen when my universal application comes back to the foreground?

I have a universal iPhone / iPad application that I'd like to have support multitasking. On a multitasking OS, when my application goes to the background and then returns to the foreground, all I see is a black screen. What could be causing this and how do you suggest I work around it? ...

JSON parse data problem.

Hi.. I used json framework to get data from sever database in to iphone. json arrays shows data in console. My code is: NSURL *url = [NSURL URLWithString:@"http://xxx.xxx.x.x/fetchsettings.php"]; // Modify this to match your url. NSString *jsonreturn = [[NSString alloc] initWithContentsOfURL:url]; // Pulls the URL NSLog(jsonreturn); // ...

Camera Button (shutter) icon + iPhone SDK

Can we change the shutter button icon on a Camera View? ...

How can I reboot the iPhone programmatically from within my application?

Is there any way to trigger a reboot of the iPhone programmatically from within your application, either using public or private API? ...