ios11

iOS 11 - UINavigationItem titleView when using Large Titles mode

霸气de小男生 提交于 2019-12-03 03:24:33
I'm trying to understand either it's a bug or it's the expected behavior. On iOS 10 and earlier we could set up a custom title, using navigationItem.titleView . On iOS 11 , when setting our navigationItem.largeTitleDisplayMode = .always and setting navigationItem.titleView = <Some cool UIButton> it's displaying both the normal navigation title bar and the large navigation title. Illustration: To sum up: How can we use custom titleView on our Large Navigation Title? EDIT : This is the expected result: I was able to replace the navigation bar big title with a custom view by using a subclass of

iPhone-X - How to force user to swipe twice home indicator to go home-screen

大城市里の小女人 提交于 2019-12-03 02:58:49
I'm using the code below to hide the home indicator on iPhone X, which is working fine in the emulator. -(BOOL)prefersHomeIndicatorAutoHidden { return YES; } But even though it's hidden, I am still able to swipe up from the bottom and my game goes to the home screen. I have seen a few games where the user has to swipe up once to bring up the home indicator and swipe up again to go to the home screen. So, how can I force the user to swipe the home indicator twice to go to the home screen in iOS 11 with Objective-C? This behavior is required for full-screen games. filo I had the same problem .

iOS 11: UITextView typingAttributes reset when typing

最后都变了- 提交于 2019-12-03 02:22:56
I use typingAttributes to set a new font. On iOS 10 , everything works, but on iOS 11 , first typed character is correct, but then attributes are being reset to the previous ones, and the second character is typed with the previous font. Is this a bug? Can I fix it somehow? I ran into the same issue and eventually solved it by setting typingAttributes again after every edit. Swift 3 func textViewDidChange(_ textView: UITextView) { NotesTextView.typingAttributes = [NSForegroundColorAttributeName: UIColor.blue, NSFontAttributeName: UIFont.systemFont(ofSize: 17)] } Why this happened: Apple

Adjust position of bar button item when using large titles with iOS 11

我是研究僧i 提交于 2019-12-03 01:42:46
I am using the large title navbar with iOS 11, but when I add a bar button item it looks weird positioned in the same location as the original title navbar. I would like to move the bar button item down when the title is large, and move it back into its original position when the navbar is no longer large. What would be the best way of doing this? This is an image showing the weird position of the bar button item I can get the navbar height dynamically using the viewWillLayoutSubviews(), but I can't change the position of the bar button item using setTitlePositionAdjustment override func

iOS 11. What the KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED is mean?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 01:36:29
In the new iOS11, I get some strange exceptions. I do not understand why this is happening. In the previous iOS, there was no such exception. Log attached: Crashed: com.apple.main-thread 0 libobjc.A.dylib 0x180a5e7e8 object_isClass + 16 1 Foundation 0x181f013e8 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 68 2 Foundation 0x181eff8ec NSKeyValueWillChangeWithPerThreadPendingNotifications + 300 3 QuartzCore 0x18555a6dc CAAnimation_setter(CAAnimation*, unsigned int, _CAValueType, void const*) + 156 4 QuartzCore 0x18555d388 -

how can i put these print text into Textfield?

假如想象 提交于 2019-12-03 01:21:47
问题 UNUserNotificationCenter.current().getPendingNotificationRequests { DispatchQueue.main.async{//Contextual closure type '() -> Void' expects 0 arguments, but 1 was used in closure body let str:String = "" self.finalresulter.text = str self.finalresulter.text = "\($0.map{$0.content.title})" } } 回答1: You are using $0 inside async { } closure. This closure expects no arguments, which means using $0 argument shortcut is invalid. You are evidently attempting to refer to requests array from

单点登录与IOS11

匿名 (未验证) 提交于 2019-12-03 00:39:02
本文翻译自 https://www.pingidentity.com/en/company/blog/2017/08/08/single_sign-on_and_ios_11.html 嗨,认证服务架构师们,你们是否察觉到即将到来的新版iOS和macOS中的一些变化?这些变化发生在2017年7月份并且可能会影响到你所在的公司单点登录(SSO)系统的用户体验。 当前(博客发布时间是2017年8月,译者注)safari的最新beta版本已经加强了对跨域用户信息追踪(cross-domain tracking of users)的限制。这是通过在浏览器状态机制中添加额外的限制(restrictions)――特别是cookies和HTML5 local storage机制――来完成的。而大多数机构正是通过以上的机制来实现单点登录(SSO)。 单点登录(SSO),是指这样一种能力:仅需进行一次认证即可使用户的认证状态被多个网站或手机应用识别,期间不需要用户再次提供登录凭证,在技术上也可称为一种“跨域追踪系统”(cross-domain tracking system)。 在本文中,我们将谈及这些即将到来的safari的变化,以及原生应用将会有哪些影响。 行业推荐的方案是由基于web的认证服务器来完成认证工作,而不是由App自己去获取用户认证凭证。这样做有以下好处: -

UISearchController iOS 11 Customization

空扰寡人 提交于 2019-12-03 00:20:21
问题 I had been using the following code prior iOS 11 to customize the appearance of the UISearchController search bar: var searchController = UISearchController(searchResultsController: nil) searchController.searchBar.setDefaultSearchBar() searchController.searchResultsUpdater = self if #available(iOS 11.0, *) { navigationItem.searchController = searchController } else { tableView.tableHeaderView = searchController.searchBar } extension UISearchBar { func setDefaultSearchBar() { self.tintColor =

iOS 11 URL Scheme for specific Settings section stopped working

人盡茶涼 提交于 2019-12-02 23:21:54
My app uses a URL scheme to take users directly to Settings/General/About section, the following URL was working fine in 10.3.x. "App-Prefs:root=General&path=About" However, this URL scheme no longer works in iOS 11 GM build. It only launches the Settings app, but doesn't take user any further. Does anybody know if this is expected in iOS 11 official release? Thanks in advance. let url = NSURL(string: "app-settings:root=Privacy&path=LOCATION")! as URL UIApplication.shared.open(url, options: [:], completionHandler: nil) It works fine for me, iOS11 both on iPhone device and simulator. "App-Prefs

How to generate an UIImage from AVCapturePhoto with correct orientation?

回眸只為那壹抹淺笑 提交于 2019-12-02 23:03:07
I am calling AVFoundation 's delegate method to handle a photo capture, but I am having difficulty converting the AVCapturePhoto it generates into an UIImage with the correct orientation. Although the routine below is successful, I always get a right-oriented UIImage ( UIImage.imageOrientation = 3). I have no way of providing an orientation when using the UIImage(data: image) and attempting to first use photo.cgImageRepresentation()?.takeRetainedValue() also doesn't help. Please assist. Image orientation is critical here as the resulting image is being fed to a Vision Framework workflow. func