iphone-5

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

柔情痞子 提交于 2019-11-27 20:40:51
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 doubt of having downvotes. Please bear with me for that. I guess this question is very basic to

Unable to handle orientation in iOS 6?

为君一笑 提交于 2019-11-27 20:05:39
问题 I am using - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation delegate to change the frame of my view based on the orientation type i.e., if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { self.view.frame=CGRectMake(0,0,500,300); } else { self.view.frame=CGRectMake(0,0,300,400); } How to handle the same situation in iOS 6 as -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation has been deprecated in iOS6

Same xib for iPhone4 and iPhone5 possible?

醉酒当歌 提交于 2019-11-27 18:02:49
Is there any way I can design my classes for both iPhone4 and iPhone5 using the same xib? Yes, you can use the same XIB to design for iPhone 4 and iPhone 5 by using Auto-Layout. Build an app using iOS 6 as the Base SDK and use the Auto Layout feature to make screens that can scale for all type of screens. You'll need Xcode 4.5 to do this. Get started with Auto Layout here: http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2 http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2 Add a image named Default-568h@2x.png. That will identify your app as one that

How to consolidating the translucency of the navigation bar between iPhone 5S and 5?

二次信任 提交于 2019-11-27 16:47:09
问题 I have difficulty consolidating the UINavigationBar's barTintColor between iPhone 5 and 5S. Both of my phones are on iOS 7. In the following screenshot, the top is 5S and the bottom is 5. iPhone 5S shows an extremely translucent effect while iPhone 5 shows a much more subtle effect. Only very dark objects are visible behind the navigation bar for iPhone 5. [[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil] setBarTintColor:[UIColor colorWithRed:46.0 / 255.0 green

Developing fullscreen 4inch app in xcode [duplicate]

心已入冬 提交于 2019-11-27 14:03:36
问题 Possible Duplicate: How do I support the taller iPhone 5 screen size? How to make my app 4inch-ready? My app in iOS6GM simulator looks not 4inch-sized. Is there any option in xcode to use all 4 inches? 回答1: Some users have reported that it was fixed after adding the startup image Default-568h@2x.png (see below). For updating to iPhone5 I did the following: Autorotation is changing in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation: method of UIViewController is deprecated. In its

iPhone 5 (4\") bottom toolbar not responding

余生颓废 提交于 2019-11-27 13:56:31
I'm trying to modify an app to work with the new iPhone 5, 4" screen. I've added the new launch image, "Default-568h@2x.png". After that everything seemed good. Middle portion of my views is resizing ok. However I've noticed that in a view where I have a bottom toolbar, the buttons on the toolbar are unresponsive. It looks ok, but tapping buttons does nothing. Same code run in simulator with 3.5" screen works fine. Any ideas? This view is within a navigation controller. It consists of a table view and toolbar. The tableview is set to resize height. I had the same problem and noticed that my

Images for iphone 5 retina display

自作多情 提交于 2019-11-27 12:48:36
iPhone 5 released, with new screen size and resolution. When we used images for iPhone 4 (retina), we just added "@2x" to image name. Can anybody tell me, is it possible to add different images (backgrounds, buttons, etc), for new iPhone screen? And the second question: can I have in my app separate XIB files: for iPhone old, iPhone new (like for iPhone and iPad)? Thank you! Ben Clayton Here's an except from my blog about this subject: [UIImage imageNamed:] automatically loads @2x versions of images when running on a retina device. Unfortunately, imageNamed: will NOT automatically load -568h

XCode 4.5 (4G182) + iPhone 5 iOS6 - Choose a destination with a supported architecture in order to run on this device

南楼画角 提交于 2019-11-27 12:48:06
问题 So I have a brand new app I created last night for iOS6, using XCode 4.5. I can properly develop on my iPhone 4 with iOS6. Today I got my new iPhone 5 with iOS6 and, after updating the certificates with the new device UUID, I tried to run my app on it and got this error: XCode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device. I've enabled the device for development. Both armv7 and armv7s are on the settings. I have

Set rootViewController of UINavigationController by method other than initWithRootViewController

醉酒当歌 提交于 2019-11-27 11:38:01
How Do I set the rootViewController of UINavigationController by a method other than initWithRootViewController ? I want use initWithNavigationBarClass:toolbarClass: to deliver a custom toolbar for my NavigationController, so I don't think I can use initWithRootViewController . You can solve this by calling setViewControllers . Like this: UINavigationController *navigationController = [[UINavigationController alloc] initWithNavigationBarClass:[MyNavigationBar class] toolbarClass:[UIToolbar class]]; [navigationController setViewControllers:@[yourRootViewController] animated:NO]; Knowledge

Black bars appear in app when targeting iOS7.1 or 7.0 in Xcode6

ぐ巨炮叔叔 提交于 2019-11-27 10:27:56
Steps to reproduce: Create a new project using Xcode6 (single view template, iPhone only, Objective-C) Navigate to project settings and change the deployment target from 8.0 to 7.1 Run the application on a iPhone5/S with 7.1 installed or in the iPhone5/s 7.1 simulator (You may have to download the iOS7.1 simulators) The app appears with black bars on the top and the bottom. If you run the application on the iPhone5/S 8.0 simulator, the screen will appear as expected, all white. Why is this happening? Is there a fix or workaround? I was able to resolve the issue manually, seems like it is a bug