ios6

Using presentViewController from UIView

两盒软妹~` 提交于 2019-12-29 17:41:52
问题 I am creating a title bar for my iOS application and I am making this inside a UIView. The only issue I am having is with the "home button". When the home button is pressed, it needs to go to the home page, which is ViewController. However, it doesn't look as if [self presentViewController:vc animated:NO completion:NULL]; works for UIView. How do I work around this problem ? - (void) createTitlebar { CGRect titleBarFrame = CGRectMake(0, 0, 320, 55); //Create the home button on the top right

iOS 6 - UIActivityViewController items [duplicate]

对着背影说爱祢 提交于 2019-12-29 11:40:54
问题 This question already has answers here : Different data for sharing providers in UIActivityViewController (4 answers) Closed 6 years ago . Hope everyone is aware of iOS 6 contains new style of ActionSheet (UIActivityViewController). The UIActivityViewController can be initiated with the paramentes like string, url, image etc. Below is the code snippet for that (where items is an array with string and url params). UIActivityViewController *activityVC = [[UIActivityViewController alloc]

Calculate lessthan value using NSExpression?

混江龙づ霸主 提交于 2019-12-29 09:33:26
问题 For the following block of code: NSString *formul=@"5 < 9"; NSExpression *e = [NSExpression expressionWithFormat:formul]; int result = [[e expressionValueWithObject:nil context:nil] intValue]; NSLog(@"formule:%d", result); I got error: due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "5 < 9 == 1"' 回答1: You can use NSPredicate instead: NSString *formul = @"15 < 9"; NSPredicate *predicate = [NSPredicate predicateWithFormat:formul]; BOOL b =

Supporting iOS 4.3 to iOS 6.0

佐手、 提交于 2019-12-29 09:27:10
问题 I already have the base code that supports ios 4.3 to ios 5. Now I would also like to support ios 6.0. The present base code has modal views , hard coded CGRect's , and rotation is different for each view. So I would like to know whether we can support ios 4.3 to ios 6.0 with the same base code, by just tweaking some changes, or do we need to create a complete new target? Like we cannot use auto layout of ios 6.0 if I want to support previous versions as it will lead to a crash. 回答1: Yes, we

Set different supportedInterfaceOrientations for different UIViewControllers

≯℡__Kan透↙ 提交于 2019-12-29 08:12:48
问题 So, as by the question, I use the following code to set userinterfaceOrientation for the viewcontroller. - (BOOL) shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } I tried setting UIInterfaceOrientationMaskAll for another viewController. Prior, I checked all the items for Supported interface orientations in the info-plist. Both the viewControllers returned true (as set in the info-plist) for all the orientations and

Set different supportedInterfaceOrientations for different UIViewControllers

你。 提交于 2019-12-29 08:12:08
问题 So, as by the question, I use the following code to set userinterfaceOrientation for the viewcontroller. - (BOOL) shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } I tried setting UIInterfaceOrientationMaskAll for another viewController. Prior, I checked all the items for Supported interface orientations in the info-plist. Both the viewControllers returned true (as set in the info-plist) for all the orientations and

iOS 6 iAd property and methods deprecated

依然范特西╮ 提交于 2019-12-29 07:35:13
问题 Since iOS 6 release, there are some iAd properties and methods that are deprecated like : currentContentSizeIdentifier requiredContentSizeIdentifiers ADBannerContentSizeIdentifierPortrait ADBannerContentSizeIdentifierLandscape So what's the best way to implement iAd now on both orientation ? Should we now resize the banner view frame manually ? 回答1: I have my application only support Landscape mode(should work for Portrait mode also), and have iAd showing up on the top of the application. And

iPhone 5 TabBar not functioning in proper position

主宰稳场 提交于 2019-12-29 06:41:05
问题 I am updating our app and I have added the new default image but my tab bar was not working on the iPhone 5. I did some research and created an if statement checking for the size of the display and then placing the tab bar in the proper location. The problem is that when the if statement hits the iPhone 5 screen size and places the tab bar in the right place, the buttons do not work... If I change the vertical location to a lesser value the buttons then work. Here is the code: UITabBar

How can I get UIWebView to open Facebook login page in response to the OAuth request on iOS 5 and iOS 6?

老子叫甜甜 提交于 2019-12-29 04:54:08
问题 We have: (1) Facebook API-based web application with Facebook OAuth functionality (“the FB web app”) (2) UIWebView -based browser on iPad (“the Browser”) Our objective is to open the Facebook Login page to sign in to the FB web app (1) inside the UIWebView-based Browser (2) on iPad. There is a somewhat similar issue here: http://facebook.stackoverflow.com/questions/11337285/no-longer-able-to-login-to-ios-app-via-oauth-the-page-requested-was-not-found However, the issue of that question

How to get my iPhone app listed in iPhone's native Photos app share menu?

旧城冷巷雨未停 提交于 2019-12-28 16:12:10
问题 Is it possible to list my iPhone app in iPhone's native photos app's share/send menu? Some links says not possible. But then how facebook, twitter apps are allowed as those too are native apps not developed by apple. Any help is appreciated. Thanks Sayali 回答1: Apple has made a special exception for Facebook and Twitter because of their integration with iOS. Any other apps cannot do that. UPDATE: Share extensions were introduced in iOS 8, which allow developers to add their apps to the list of