ios11

iOS11 customize navigation bar height

我们两清 提交于 2019-12-04 08:07:06
问题 First of all, thank you for coming here and help solving my problem. Thank you!!! In iOS11 beta6, sizeThatFits: seems to not work on UINavigationBar. I notice that UINavigationBar structure has changed by Reveal my app. I have tried my best to change custom navigation bar's height. But it seems always to be 44 , and it works before iOS11. - (CGSize)sizeThatFits:(CGSize)size { CGSize newSize = CGSizeMake(self.frame.size.width, 64); return newSize; } Oddly, I just log its frame in

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

拜拜、爱过 提交于 2019-12-04 07:50:21
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? Yes, you can: override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) let configuration = ARWorldTrackingSessionConfiguration() sceneView.session.run(configuration, options: [

UINavigationController method setToolbarHidden bug in Xcode 9: infinite calculation of auto-layout constraints leads to OOM

丶灬走出姿态 提交于 2019-12-04 06:41:28
I have an instance of UINavigationController nested in UITabBarController . I use the navigation controller to reach some view controller (tab bar still visible), from which I segue to a second view controller (tab bar no longer visible). In the second view controller, as soon as I make a call to: [self.navigationController setToolbarHidden:NO] the app freezes and memory grows until OOM exception crashes it. I acknowledge that nesting the navigation controller inside the tab bar is not recommended, but this setup seemed to work fine until iOS 11. EDIT: when stopping execution, I see a lot of

RPScreenRecorder stopRecording block not getting called

雨燕双飞 提交于 2019-12-04 06:16:23
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 in if let error = error { self.showScreenRecordingAlert(message : error.localizedDescription) return }

UIKeyboardWillShowNotification issues with ios 11 beta 7

╄→尐↘猪︶ㄣ 提交于 2019-12-04 05:57:08
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; codeBottomViewALBottomDistance.constant = keyboardSize.height + initialCodeBottomDistance; double animationDuration = [[

How to reposition compass of MKMapView?

怎甘沉沦 提交于 2019-12-04 04:11:33
问题 I want to move the MKMapView compass. I wanted to get a reference for it by something like this: let compassView = mapView.subviews.filter {$0 is NSClassFromString("MKCompassView")} However the compiler complains " Use of undeclared type 'NSClassFromString' ". How can I fix this code? 回答1: iOS 11 you should use MKCompassButton , doc explaining the new stuff: WWDC 2017 new MapKit presentation. let compassButton = MKCompassButton(mapView:mapView) compassButton.frame.origin = CGPoint(x: 20, y:

ios 11 Beta 5 select drop-down list issue

孤者浪人 提交于 2019-12-04 04:03:57
HTML Select drop-down list is not getting dismissed properly on iOS 11 beta 5. Upon closing the drop-down, an empty drop-down with blank options reappears in its place. Please let me know if anyone else experienced the same issue and if a workaround is available for the same. Note: It is a hybrid app built for iPad only and this issue is not reproducible on iOS 10 or below. Tim Combridge I've had a similar issue and discovered that in the <option> tag there is a label="" value. This only affects iOS 11, and 10 we've noticed as well. Populate your label="" value. solution in another thread This

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

拜拜、爱过 提交于 2019-12-04 04:02:24
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 = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]

UICollectionView fails to honour zPosition and zIndex - iOS 11 only

家住魔仙堡 提交于 2019-12-04 03:24:57
问题 I try to find a workaround for this radar: http://www.openradar.me/34308893 Currently in my - (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes I'm doing the following: dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_MSEC * 50), dispatch_get_main_queue(), ^{ self.layer.zPosition = 0; }); But no matter how many NSEC_PER_MSEC I enter it doesn't work quite right, the scrolling indicator sometimes hides behind the headers, especially when ne headers appear.

Glitchy animation of UIRefreschControl with large titles for navigation bar

China☆狼群 提交于 2019-12-04 03:23:07
I have a controller embedded in a navigation controller with Large Titles and a UIRefreshControl. When I pull-to-refresh on my tableView, the animation of the activity indicator is very glitchy. I don't know if I have a bad behaviour in my code ? tableView.refreshControl = UIRefreshControl() tableView.refreshControl?.addTarget(self, action: #selector(downloadData), for: .valueChanged) Li Sim If your have set your navigation bar translucency appearance to false, then you need to include the following code in your view controller to handle opaque bars. Also, in storyboard, the tableView has to