ios9

Unable to see images in Camera roll in iPad Simulator when run at iPhone resolution

廉价感情. 提交于 2019-12-07 20:15:28
I made an image editing app for iPhone , and it got rejected because the app is not able to run on ipad at iphone resolution . It failed in both 1x and 2x resolution . When I click choose photo , I present the camera picker to select a pic, but camera picker is not showing any images in the simulator .(I didnt test this in real device, I beleive apple will test this in real device) It works normally in iPhone , and also in iPad if I make the app Universal . But If I make the app compatible for iPhone , then it should also run in iPad at iPhone resolution, which is not happening in my case!!!

SKSpriteNode can't load image from Images.xcassets in some iOS 9 simulators

倖福魔咒の 提交于 2019-12-07 19:10:34
问题 I was working on a game using SpriteKit recently and found an interesting problem. When I initiated a SKSpriteNode from an image saved in the Images.xcassets, it didn't work in some iOS 9 simulator. The code I used is: let tortoise = `SKSpriteNode`(imageNamed: "tortoise") When testing it in simulators, I found although it worked in most iOS 8.4 and iOS 9 simulators, it didn't work in iPad 2 (iOS 9) and iPhone 4s (iOS 9). The SKSpriteNode wasn't displayed in those 2 simulators and the

How to pass array by reference without function ? swift

孤街浪徒 提交于 2019-12-07 15:20:24
问题 I have this class: class MainView:UIView{ var categories:[Category]! } i want to set the categories arg, but i need to pass it by reference not value. because it's more efficient and better. so if i did this: let mainView = MainView() mainView.categories = categoriesData. then it pass it by value. if i need to pass it by reference i could do that by using function inside the MainView() class MainView:UIView{ var categories:[Category]! fun setCategories(inout categories: Int){ self.categories

GTMSessionFetcher.h file not found upgrading app to latest google-api-objectivec-client

我只是一个虾纸丫 提交于 2019-12-07 10:18:40
问题 I implement access to Google Drive in my iOS app. This has been an active feature in the app since middle of 2014 and functions properly under iOS 6, 7 & 8. I am currently checking my project for compatibility with iOS 9. I've downloaded the latest google-api-objectivec-client to ensure my project remains up to date. I redid the standard Google implementation... as detailed in this page and included for completeness at the end of this post. Problem: When I attempt to build in any of my

accessory bar hiding in ios 9

只愿长相守 提交于 2019-12-07 10:17:20
问题 Hi can someone help me out i want to hide the accessory bar from keyboard in ios 9 its working find till ios 8 but in ios 9 i am not able to hide the accessory bar i tired this code but its not working for (UIView *possibleFormView in [keyboardWindow subviews]) { if([[possibleFormView description] hasPrefix:@"<UIInputSetContainerView"]) { for(UIView *view1 in possibleFormView.subviews) { if([[view1 description] hasPrefix:@"<UIInputSetHostView"]) { for (UIView *peripheralView_sub in view1

How to detect user returned to your app in iOS 9 new back link feature?

断了今生、忘了曾经 提交于 2019-12-07 07:00:30
问题 Have an application which links to the settings app through: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; In iOS 9, there is now a way for the user to return to the app again by one back link on the top left of the screen. Does anybody know how my app can detect that the user came back again? I need to reload the tableview and the viewWillAppear function does not get executed unfortunately... 回答1: I found it out, just listen to the

UIAlertController not working in iOS 9

我的梦境 提交于 2019-12-07 06:36:32
问题 I have added the UIAlertController code showing login and password textfields, it works for iOS 8 but in iOS 9 not works. The textfields shrinks as shown in figure below The code I am trying is as follows : - (void)toggleLoginLdap:(UIViewController *)currentVC { if ([UIAlertController class]) { self.alertController= [UIAlertController alertControllerWithTitle:@"Title of Msg" message:@"Hello" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK"

UIStackView and multi-line labels in a UITableViewCell

我与影子孤独终老i 提交于 2019-12-07 06:09:09
问题 I want to have a custom UITableViewCell with a number of vertically stacked UILabel s all of which can contain text that wraps multiple lines. With the new UIStackView in iOS9 and the cell self-sizing mechanism I thought this would be straightforward, but I can't get it to work. I am using Xcode 7beta3. I created a simple test app. This is the setup in IB: The UIStackView is vertical with UIStackViewDistribution.Fill and UIStackViewAlignment.Fill but I have basically tried all the

Register notification in iOS 9

久未见 提交于 2019-12-07 05:21:42
问题 I am using this to register notification : if application.respondsToSelector("registerUserNotificationSettings:") { let types:UIUserNotificationType = (.Alert | .Badge | .Sound) let settings:UIUserNotificationSettings = UIUserNotificationSettings(forTypes: types, categories: nil) application.registerUserNotificationSettings(settings) application.registerForRemoteNotifications() } else { // Register for Push Notifications before iOS 8 application.registerForRemoteNotificationTypes(.Alert |

Can't hide status bar on launch

こ雲淡風輕ζ 提交于 2019-12-07 05:11:54
问题 I'm building an iOS 9 app with horizontal pages navigation and need to show the status bar on some pages, and hide it on others. I want to use the fade in/out animation so I have to set View controller-based status bar appearance = NO and update the status bar like this: [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; This procedure works perfectly when navigating between pages, but I can't get rid of the status bar on launch. I have tried