ios8

When can I use Photos Framework and iCloud Photo Library?

感情迁移 提交于 2019-12-12 06:16:30
问题 I want to provide my users a photo picker which displays all their images similarly to the Photos app. Currently I can use two frameworks, the old Assets Library and the new Photos Library frameworks. Is there any recommendation how should I choose between these two? The documentation states: In iOS 8.0 and later, use the Photos framework instead of the Assets Library framework. The Photos framework provides more features and better performance for working with a user’s photo library. But as

Setting NavigationController's NavigationBar translucent property to false causes extra padding

巧了我就是萌 提交于 2019-12-12 06:04:08
问题 There appears to be extra padding at the top of the root content view when the translucent = false property is set on the NavigationController's NavigationBar (programatically or via the StoryBoard). I've tried adjusting the scroll view insets but to no avail. translucent = true doesn't cause this problem. Any ideas why this is happening and what the easiest way to resolve it is? 回答1: Ah-ha - got there in the end. When not using a translucent navigation bar you need to ensure that both

Change Viewcontroller based on device orientation in iOS 8/9

拜拜、爱过 提交于 2019-12-12 05:32:24
问题 What is the preferred way of segueying between two viewcontrollers based on device orientation in iOS 8/9? I want to build an instrument that is shown in landscape. In portrait i want to show the settings of the App. 回答1: In AppDelegate.swift inside the "didFinishLaunchingWithOptions" function I put: NSNotificationCenter.defaultCenter().addObserver(self, selector: "rotated", name: UIDeviceOrientationDidChangeNotification, object: nil) And then inside the AppDelegate class, put the following

Can't make UiTableView work

拜拜、爱过 提交于 2019-12-12 04:55:45
问题 I am working on a project on XCode 6 and Swift. I need to add a UITableView to a UIViewController, and then fill the table with content. So, on my default UIViewController, I added a UITableView and a UITableViewCell (using the storyboard). Next, I set the UIViewController as the dataSource and delegate for the table. Finally, I added this code to my view controller.swift: import UIKit class ViewController: UITableViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var

interstitialAd will not show up

天涯浪子 提交于 2019-12-12 04:54:47
问题 i´ve created a SK Game with one viewController and want to view full screen ads but they don´t show up. in ViewController.m: (viewWillAppear) self.interstitialPresentationPolicy = ADInterstitialPresentationPolicyManual; [self requestInterstitialAdPresentation]; inAppDelegate.m: [ViewController prepareInterstitialAds]; 回答1: Your approach looks correct, and you are right that you only need those method calls, You may just need to move: [self requestInterstitialAdPresentation]; into

UINavigationBar appearance addSubview not working in iOS 8

China☆狼群 提交于 2019-12-12 04:52:28
问题 I want to add an image to the navigationBar. Ive used [[UINavigationBar appearance] addSubview:logoImage]; it seems to work with iOS 7 but does not work with iOS 8, can anybody please explain why this is happening, and what is the alternate way to add an imageView on navbar in iOS 8? 回答1: Calling [[UINavigationBar appearance] returns an appearance proxy for the receiver class. The addSubview: method is not tagged as UI_APPEARANCE_SELECTOR . One major downside to UIAppearance's proxy approach

Which xcode to be used to upload new version on iTunes compatible with iOS 8?

给你一囗甜甜゛ 提交于 2019-12-12 04:45:50
问题 I have to upload newer version of my app which is compatible to iOS 8. When I am uploading the app from Xcode 6.1 (Not Beta) I am getting following error Apps and app updates submitted to the App Store must be built with Xcode 5.1.1 or later, and iOS 7 or later SDK. and when I am uploading the app with XCode 5.1.1 I am not able to use the following code for Push Notification. UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge

Are there any downsides to using only @x3 images on an iOS app?

放肆的年华 提交于 2019-12-12 04:44:55
问题 Are there downsides for using only @x3 images, showing the same images on both @x2 devices (iphone 4, 4s, 5, 5s, 6) and @x3 devices (6+) i guess it means resizing on the fly. or should i use @x1 @x2 and @x3? thanks! 回答1: If you only use @x3 images, the downside is that iOS will have to "do the dirty work". So your app will be a little bit slower as the system will have to scale your images for @x2/@x1 devices Also your screens might look less sharp as odd pixels in @x3 don't scale down nicely

Passing custom objects between two iOS Apps

↘锁芯ラ 提交于 2019-12-12 04:39:45
问题 I need some help on something. I have two apps under my account. I need to pass a custom object from App A to App B. How can I do this using app groups ? I saw that using URL schemes is a old a way of doing it. So what is the newest way of passing data two apps ? 回答1: IN YOUR APP A (SAVE OBJECT) Under capabilities, Click "+" to add an App Group In your Object Class, you need to extend the class you want to share to NSObject and NSCoding class Person : NSObject, NSCoding { var nom: String var

Strange behavior on scroll UITableView

久未见 提交于 2019-12-12 02:57:02
问题 I have a single view with nested scroll and table view with this hierarchical tree: (The table is loaded with some Huckleberry Finn rows taken from this example.) On viewWillAppear I programmatically scroll the Table View at the last row doing -(void)viewWillAppear:(BOOL)animated { [self.tableView reloadData]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[self.tableView numberOfRowsInSection:0]-1 inSection:0]; [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition