ios11

iOS 11: Height of UINavigationBar for large title (mimic Apple Music App)

梦想与她 提交于 2019-12-06 04:53:16
问题 I'm trying to mimic the look of UINavigationBar as used by the Apple Music App (the date is shown above the large title). I know that the Apple Music App doesn't use the standard UINavigationBar of ios11 but a header view is UICollectionView . I also want to use the standard UINavigationBar of ios11 because of the resizing feature for title text. I'm able to add the custom date label to view hierarchy of the large title view , my code as shown below: self.title = "Large Title"

How to put ARSCNView in Tabview controller without freezing the ARSession?

白昼怎懂夜的黑 提交于 2019-12-06 03:57:40
问题 I am trying to implement ARKit of iOS 11 beta in my app(Tabbed application). But as said in ARKit Session Paused and Not Resuming thread, whenever i change the tab to another view controller and come back, the ARSession is getting freezed and not resuming. Is it possible to implement ARSCNView in a tabbed application so that if you come back i can resume the ARSession? If so how to do it? 回答1: Yes, you can: override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) let

iOS11: UIActivityViewController not successfully sharing UIImage to 3rd party apps

眉间皱痕 提交于 2019-12-06 02:31:03
问题 So in iOS10 if you wanted to share an image with UIActivityViewController, you would just need to write some swift3 code that looked like: func shareTapped() { if let image = imageView.image { let vc = UIActivityViewController(activityItems: [image], applicationActivities: []) vc.popoverPresentationController?.barButtonItem = navigationItem.rightBarButtonItem present(vc, animated: true, completion: nil) } This method still appears to work if you want to save the image to your camera roll

UIKeyboardWillShowNotification issues with ios 11 beta 7

倾然丶 夕夏残阳落幕 提交于 2019-12-06 02:02:10
问题 Testing my app on iOS 11 beta 7 - it seems like the keyboard doesn't push up the content if my UIViewController. The code looks like this (working since iOS7): - (void)handleNotification:(NSNotification*)notification { if (notification.name == UIKeyboardWillShowNotification) { CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; nextButtonALBottomDistance.constant = keyboardSize.height + initialPhoneBottomDistance;

SDK compiled with xcode 9 does not work fine in xcode 8

爷,独闯天下 提交于 2019-12-06 01:32:45
I've an SDK that I built with Xcode-9-Beta. However, I'm trying to use this framework in a project that's running Xcode 8.3.3. However, I get a build error which says, ld framework not found "FileProvider" for architecture x86_64 Now, this FileProvider has been introduced in iOS-11 and I'm not using it anywhere in the SDK code. What could be the possible error. Please comment if you need further data around this. FileProvide framework is only available in Xcode 9. You need to download and install Xcode 9 manually and copy the FileProvider framework from Xcode 9 to the same directory of Xcode 8

RPScreenRecorder stopRecording block not getting called

岁酱吖の 提交于 2019-12-06 01:24:54
问题 I have searched enough but failed to get a solution. I am using ReplayKit to record the screen of my app. I have started recording the screen by calling let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.startRecording() { error in if let error = error { self.showScreenRecordingAlert(message: error.localizedDescription) } } When I am pressing the stopRecord button I am calling let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.stopRecording { previewViewController, error

UIManagedDocument saveToURL completionHandler is not called - Error message: “The reader is not permitted to access the URL.”

℡╲_俬逩灬. 提交于 2019-12-06 01:23:54
问题 I've got an old app that uses UIManagedDocument to interact with Core Data. However on iOS 11.2 (and possibly earlier iOS 11 point releases) the saveToURL:forSaveOperation:completionHandler: method seems to have stopped working both on-device and in the simulator (however it does still work in the iOS 10.3.1 simulator). Specifically, in the code below the completionHandler inside the first if statement is never executed (as NSLog messages indicate). - (void)useDemoDocument { NSURL *url = [[

ARKit Demo Crashing on iPhone 6/iPhone 6 Plus

醉酒当歌 提交于 2019-12-05 23:41:14
问题 I'm working with ARKit Feature , with recent major iOS release, but I'm getting a crash with error failed assertion MTLRenderPassDescriptor: MTLStoreActionMultisampleResolve store action for the depth attachment is not supported by device I already have iOS11 beta, installed in my iPhone device. 回答1: As all answers above this is a hardware constraint to A9 chips. Anyway it is a good practice to addAdding ARKit to UIRequiredDeviceCapabilities on Info.plist will give you a better feedback

Wrong placement of search text field inside search bar on iOS 11

倖福魔咒の 提交于 2019-12-05 23:17:34
I am using UISearchController as part of navigation bar using the new APIs introduced in iOS 11. I am using it in the following manner in my ViewController's viewDidLoad - (void)viewDidLoad { [super viewDidLoad]; [_table setDataSource:self]; [_table setDelegate:self]; searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; [self.navigationItem setSearchController:searchController]; [self.navigationItem setHidesSearchBarWhenScrolling:NO]; [searchController.searchBar setBackgroundColor:[UIColor greenColor]]; } However, the search text field is rendered at the wrong

Programmatic beginRefreshing() on iOS11 has problems with largeTitles mode

孤者浪人 提交于 2019-12-05 23:01:22
We have found what seems to be a bug in UIKit but wanted to post here to see if anyone else has this problem or found a solution. We're trying to use the new iOS11 large titles and hoisted search bar/refreshcontrol. We seemed to have found a problem where the root viewController of the navigation stack shows a minor display issue (problem A) but once another viewcontroller is pushed onto the navigation stack, the display goes nuts (problem B): Things to note: The problem is worse on the 2nd VC in the stack rather than the 1st The refreshControl is not the green color the code sets it to the