ios10

Since Xcode 8 and iOS10, views are not sized properly on viewDidLayoutSubviews

谁都会走 提交于 2019-11-26 10:12:34
问题 It seems that with Xcode 8, on viewDidLoad , all viewcontroller subviews have the same size of 1000x1000. Strange thing, but okay, viewDidLoad has never been the better place to correctly size the views. But viewDidLayoutSubviews is! And on my current project, I try to print the size of a button: - (void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; NSLog(@\"%@\", self.myButton); } The log shows a size of (1000x1000) for myButton! Then if I log on a button click, for example, the log

iOS 10 error [access] <private> when using UIImagePickerController

这一生的挚爱 提交于 2019-11-26 08:47:24
问题 I am using XCode 8 and testing with iOS 10.2 Beta. I have added the Photos, PhotosUI and MobileCoreServices frameworks to project. Very simple code: #import <Photos/Photos.h> #import <PhotosUI/PhotosUI.h> #import <MobileCoreServices/MobileCoreServices.h> @interface ViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate, PHLivePhotoViewDelegate> @property (strong, nonatomic) IBOutlet UIImageView *imageview; @end and implementation: - (IBAction)grab:

“Reading from public effective user settings” in iOS 10

限于喜欢 提交于 2019-11-26 08:14:24
问题 I\'m getting the following messages when launching my app: 2016-10-12 14:47:23.705002 Discovery[377:147958] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2016-10-12 14:47:23.712212 Discovery[377:147958] [MC] Reading from public effective user settings. Is \"system group container\" related to App Groups? I do share data between apps using an App Group and was wondering

swift Take a photo and save to photo library

懵懂的女人 提交于 2019-11-26 07:58:40
问题 I have been searching and unable to find the answer to this. I have a button \"take a photo\" and when pressed, it opens the camera, you take a photo and when you select \"Use Photo\", I want it saved to the photo library. I am able to do all but save to the library, can someone help? this is the code I have to open the camera: 回答1: Use below code for an image taken from Photo Gallery and save inside photo library. Code Support for Swift 3.1 & 4.0 version: First, we have to do the setup for

Xcode 8 generates broken NSManagedObject subclasses for iOS 10

最后都变了- 提交于 2019-11-26 07:00:08
问题 I updated my iOS app project recently to iOS 10. Now I\'m trying to change the Core Data Model of my app but the new NSManagedObject subclasses which Xcode generates are broken. I also tried to fix the subclasses manual but this doesn\'t work. The minimum tools version for the Core Data Model is set to Xcode 7.0 and code generation language is set to Swift. This is the code which Xcode generates: import Foundation import CoreData import extension Group { @nonobjc public class func

Xcode error: Code signing is required for product type &#39;Application&#39; in SDK &#39;iOS 10.0&#39;

半腔热情 提交于 2019-11-26 06:57:04
问题 I have Xcode 8 installed on OS X El Capitan. I get this error: Signing for \"target\" requires a development team. Select a development team in the project editor. Code signing is required for product type \'Application\' in SDK \'iOS 10.0\' 回答1: With Xcode-8.1 & iOS-10.1 Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID : Enable signing to Automatically && Select Team that you have created before: Change the Bundle Identifier: Code Signing to iOS Developer: Provision profile

App rejected due to missing usage descriptions (Xcode8)

江枫思渺然 提交于 2019-11-26 05:55:35
问题 So I got this mail today saying that the latest build of my app was rejected by iTunes Connect due to some missing usage descriptions. To be exact: This app attempts to access privacy-sensitive data without a usage description. The app\'s Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data. This app attempts to access privacy-sensitive data without a usage description. The app\'s Info.plist must contain an

NavigationBar delay updating barTintColor iOS10

别等时光非礼了梦想. 提交于 2019-11-26 04:54:41
问题 Context: Let\'s say we have one NavigationController and 2 viewControllers. ViewControllerA has a blue navigationBar, while ViewControllerB has a green one. I set them up like so : override func viewWillAppear(_ animated: Bool) { self.navigationController?.navigationBar.barTintColor = UIColor.blue // Green if ViewController B } It works well when I got from A to B, but when I return, the navigationBar teint is updated after. Like if it was set up in the viewDidAppear . Expected: The

iOS 10 - Changes in asking permissions of Camera, microphone and Photo Library causing application to crash

有些话、适合烂在心里 提交于 2019-11-26 03:37:22
iOS 10, Now Requires User Permission to Access Media Library, Photos, Camera and other Hardware like these. The solution for this is to add their keys into info.plist with a description for user that how we are using their data, I could only find a few keys NSPhotoLibraryUsageDescription NSMicrophoneUsageDescription NSCameraUsageDescription I want to know if there are more keys also for other hardware as in iOS 10 if you haven't provided info.plist with proper keys description your application will crash if build using XCode - 8 beta. There is a list of all Cocoa Keys that you can specify in

iOS 10 - Changes in asking permissions of Camera, microphone and Photo Library causing application to crash

。_饼干妹妹 提交于 2019-11-26 01:52:55
问题 iOS 10, Now Requires User Permission to Access Media Library, Photos, Camera and other Hardware like these. The solution for this is to add their keys into info.plist with a description for user that how we are using their data, I could only find a few keys NSPhotoLibraryUsageDescription NSMicrophoneUsageDescription NSCameraUsageDescription I want to know if there are more keys also for other hardware as in iOS 10 if you haven\'t provided info.plist with proper keys description your