iphone-5

How do I support the taller iPhone 5 screen size?

南楼画角 提交于 2019-11-27 07:37:51
My app shows up letter boxed and I want it to stretch properly to fill the whole screen. I'm creating my main window with: self.mainWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; But I'm still getting the letter boxed behavior. Is there some other setting I need to set to get the full size of the mainScreen on the device? I'm trying to avoid using any launch images if I can. I've tried this: self.mainWindow.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; and it doesn't seem to help. And I've looked through all the Info.plist

Creating a percentage based iOS layout

て烟熏妆下的殇ゞ 提交于 2019-11-27 06:27:22
I'm trying to replicate a layout that I currently have in an Android application, but I don't know how to go about it in iOS especially because of the tallness of the iPhone 5. I know how to explain this in "Android" terms but I've been trying for the past few days to do this in iOS but I can't quite get it to work. Best way to explain it: I want two layouts. The top layout must take up 40% and the bottom must take up 60%. In the top layout, they must be three buttons that fill up all space possible (Essentially 1/3 of the space) In the bottom layout, I want an imageView, and then a textView

Undo auto resizing for iPhone 5 screen after adding Default-568h@2x.png

烂漫一生 提交于 2019-11-27 05:50:05
问题 I followed the instructions in this answer: https://stackoverflow.com/a/12397309/1084932 to update my app for the new iPhone 5 screen size. Great, worked perfectly! But, I am not quite ready to make this update and wish to roll back to the letterbox setup for now. I tried deleting Default-568h@2x.png to see if that would work, but my app still fills up the full iPhone 5 screen even without the Default-568h@2x.png file. Anyone know how to undo the auto resizing for iPhone 5 after adding

Hardware-dependent NSDateFormatter dateFromString: bug (returns nil)

这一生的挚爱 提交于 2019-11-27 05:29:13
I have several date strings that I need to convert to NSDates. My parsing code is the following: NSString *s = [pair objectForKey:@"nodeContent"]; NSDateFormatter *f = [[NSDateFormatter alloc] init]; [f setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZ"]; self.date = [f dateFromString:s]; The above code works fine in all the devices and simulators we've tested. The strange thing is that when the above code runs on any iPhone 5 running iOS 6.1 or 7.0.x , the line self.date = [f dateFromString:s]; returns nil every time. I have checked and the string s exists and contains the same characters when compared

My button doesn't detect touch events on iPhone (Retina 4-inch) simulator, but works in iPhone (Retina 3.5-inch) simulator

心不动则不痛 提交于 2019-11-27 02:36:37
问题 I'm getting my app ready for the iPhone 5 using the simulator and I've found a weird issue where a couple of my buttons, in one of my views, don't work in the iPhone (Retina 4-inch) simulator, but work fine in the iPhone (Retina 3.5-inch) simulator. The buttons simply don't do anything when they're tapped. Has anyone else experienced this issue? I having a difficult time figuring out where to start with this one. Any suggestions on where to start? Thanks so much in advance for all your wisdom

How to switch to different Storyboard for iPhone 5?

五迷三道 提交于 2019-11-26 23:56:48
Just as an app utilizes different storyboards for iPad and iPhone, I would like my app to use a different storyboard for the iPhone 5. Since there is no option in the Info.plist to select default storyboard for iPhone 5, how would I programmatically call the storyboard? I do not want to use AutoLayout for this app unless it is absolutely the last resort. I understand how to detect if a user is using an iPhone 5 or other device with the same screen size. I just need to know how to set the default storyboard without the plist. lionserdar I was looking for the same answer couple of weeks ago here

How to add iPhone 5 large screen support to iOS apps in Xcode? [duplicate]

故事扮演 提交于 2019-11-26 22:44:11
Possible Duplicate: How to deal with iPhone 5 screen size? How can I add support for 4-inch iPhone 5 displays to an iOS app in Xcode? Is this even possible with the latest public Xcode release, v4.4.1? Luca T Add a new launch image named Default-568h@2x.png to your project and it will work! If your application is iOS6 only, the easiest way to make views that layout correctly in both 3.5-inch and 4-inch iPhone 5 designs is to use AutoLayout in your XIBs to make them adapt their size automatically (See the WWDC'2012 video sessions about that). If your application must support versions prior to

iphone 5 simulator - Cannot click on bottom of screen?

混江龙づ霸主 提交于 2019-11-26 21:37:50
问题 I'm trying to update an app to add support for the iPhone 5. Based on other threads I have seen, I have added the Default-568h@2x.png as specified and I have added some new background images to the app that are sized appropriately. The problem is that the bottom portion of my app does not seem to be responding to touch (I have a page control and an info button). Additionally, when switching screens (using the following code): [self presentModalViewController:tableNavController animated:YES];

What is the best way for supporting both screen resolution of iPhone4 and iPhone5 ? - Auto layout in only iOS6

徘徊边缘 提交于 2019-11-26 20:28:08
问题 Have anyone figured out how to support both screen resolution iPhone4 and iPhone 5 ? In iOS6 we have support of Autolayout. Can that be used for iPhone4-iPhone5 screen i.e. 320x480 and 320x568. If we use auto layout feature for that we will have to keep deployment target minimum to iOS6. What about iOS5 than ? What about iOS5 than ? Do we have to handle it programatically for different screen size ? I searched web and could not find exact answer for that so posting this question though having

How to create Custom MKAnnotationView and custom annotation title and subtitle

好久不见. 提交于 2019-11-26 20:17:39
I need to create above Annotation view on MKMapView. I am able to create the custom annotation view but on the tap of annotation the view need to be opened image with that big text, I am not able to create that one. Please provide me some links or the way to do this task. Rob To create a custom annotation view (your replacement for the standard pin), you can just set the image property of the MKAnnotationView in the viewForAnnotation method: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation { if ([annotation isKindOfClass:[MKUserLocation class]]