iphone-5

Need to access the default camera shutter sound used by the iPhone

核能气质少年 提交于 2019-11-30 17:26:06
Right now when a user presses a button I play a custom camera shutter sound. However, if possible, I would much rather just use the camera shutter sound that plays by default whenever you take a photo using your iPhone. Is there a way that I can access and use the default iPhone camera shutter sound? And if yes, then where is it actually located? I need to figure out it's file path so that I can use it with the code below and just change the input for pathForResource : NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"shutter" ofType: @"wav"]; NSURL *fileURL = [[NSURL alloc]

Conditional support of iOS 6 features in an iOS 5 app

最后都变了- 提交于 2019-11-30 12:20:20
问题 How can you support features of iOS6 in an app with a Minimal Deployment Target set to iOS 5.0? For example, if a user has iOS 5 he will see one UIActionSheet , if the user has iOS 6 he will see a different UIActionSheet for iOS 6? How do you do this? I have Xcode 4.5 and want an app running on iOS 5. 回答1: You should always prefer detecting available methods/feature rather then iOS versions and then assuming a method is available. See Apple documentation. For example, in iOS 5 to display a

How to check iPhone Device Version in iOS?

廉价感情. 提交于 2019-11-30 10:27:42
Hi i would like to check iPhone Device Version in iOS. I mean , currently running device is iPhone 4 or iPhone 5. I need to check the device , is that iPhone 5 or not? Because i have some problem in my app that need to know iPhone 5 or not. So how can i? Add this code: if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){ if ([[UIScreen mainScreen] respondsToSelector: @selector(scale)]) { CGSize result = [[UIScreen mainScreen] bounds].size; CGFloat scale = [UIScreen mainScreen].scale; result = CGSizeMake(result.width * scale, result.height * scale); if(result.height == 960) { NSLog(@

iOS 6 - Distinguishing between iPhone 5 and other devices?

给你一囗甜甜゛ 提交于 2019-11-30 09:51:37
With the announcement of the iPhone 5 and new iPods today, I'm starting work on optimizing my app to take advantage of the new, extra screen space. I've already got to the point where my app isn't "letterboxed" anymore. I know it's early, but does anyone know how I could distinguish between the new, taller devices and the old ones? Ideally, it would be something like this: if (device is iPhone 5 or taller iPod touch) { do stuff that is ideal for the taller screen } else { do what I've been doing before for the smaller screen } Thanks! I hope everyone else is also enjoying what Apple announced

Xcode Storyboard displaying the new iPhone 5 screen size?

假装没事ソ 提交于 2019-11-30 08:01:42
I have the latest version of Xcode. In one of my projects I noticed that the views for the iPhone were the new iPhone 5 screen sizes. I like it but is there a way to switch back to the smaller screen size? Not everyone has the iPhone 5. Also, when your building your interface, you'll see a small icon that lets you quickly switch between 4" and 3.5" screens. It's the rectangular icon on the left. It toggles back and forth between phone sizes. There's a size property in the attributes, so you can choose the pre iPhone5 size of 3.5 Update: It's now under Editor->Simulated Screen. It's combined

What is platform string for iPhone 5S & 5C?

℡╲_俬逩灬. 提交于 2019-11-30 06:37:55
问题 I know that someone was able to dig out iphone6,1 platform string from IOS 7 code. However, I don't know what it maps to iPhone 5S or 5C. If anyone has early access to iPhone 5S/5C, please post platform string for everyone. For more info on platform string, see these links theiphonewiki, stackoverflow and stackoverflow 回答1: iPhone6,1 = iPhone 5S GSM iPhone6,2 = iPhone 5S Global iPhone5,3 = iPhone 5C GSM iPhone5,4 = iPhone 5C Global Code: if ([platform hasPrefix:@"iPhone5,3"]) return @"iPhone

Is there an equivalent apple-touch-startup-image for the IPAD?

送分小仙女□ 提交于 2019-11-30 03:45:44
For web apps you can set the startup screen with apple-touch-startup-image What about for iPads? I had the same issue as well... You need to you use a specific size of 1004*768. i explained it in this blog: http://www.amirnaor.com/?p=71 adamdehaven This will add a Splash Screen to your Web App. Below are the sizes you’ll need for both iPad and iPhone/iPod Touch, and iPhone 5. These include the status bar area as well. <!-- iPhone --> <link href="http://www.example.com/mobile/images/apple-touch-startup-image-320x460.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit

Conditional support of iOS 6 features in an iOS 5 app

吃可爱长大的小学妹 提交于 2019-11-30 02:27:53
How can you support features of iOS6 in an app with a Minimal Deployment Target set to iOS 5.0? For example, if a user has iOS 5 he will see one UIActionSheet , if the user has iOS 6 he will see a different UIActionSheet for iOS 6? How do you do this? I have Xcode 4.5 and want an app running on iOS 5. You should always prefer detecting available methods/feature rather then iOS versions and then assuming a method is available. See Apple documentation . For example, in iOS 5 to display a modal view controller we would do something like this: [self presentModalViewController:viewController

Need to access the default camera shutter sound used by the iPhone

可紊 提交于 2019-11-30 01:11:49
问题 Right now when a user presses a button I play a custom camera shutter sound. However, if possible, I would much rather just use the camera shutter sound that plays by default whenever you take a photo using your iPhone. Is there a way that I can access and use the default iPhone camera shutter sound? And if yes, then where is it actually located? I need to figure out it's file path so that I can use it with the code below and just change the input for pathForResource : NSString *soundFilePath

Can I use two xibs with one viewcontroller - re: porting to iPhone 5

吃可爱长大的小学妹 提交于 2019-11-29 22:25:36
I just submitted my first app to the app store ( yay it was just approved! ). I now want to update it to work with (look nicer on) the larger iPhone 5 screen. I don't intend to change anything other than to change the layout a bit for the larger screen. NOTE: I don't want to have my current xib stretched. Is it possible to create two xib files (ie: copy my current xib file for the main screen) and hook them both into the view controller and have it so that when the app launches, the app detects if there is an iPhone 5 screen or an earlier screen. Then, depending on which device it is, show the