ios9

UICollectionView iOS 9 issue on project with RTL languages support

大憨熊 提交于 2019-11-27 12:03:35
问题 It seems like Apple's new feature of auto-flip interface on RTL languages cause problems when using UICollectionView . I used constraints of type Trailing/Leading for the collection view and they switched their values, as they should, on RTL language. The problem is that the data actually presented is of the last indexPath in the collection's data source but the UIScrollView.contentOffset.x of the first cell is 0. A proper behaviour would have been one of the following: Displaying the first

iOS 9 UITableView separators insets (significant left margin)

安稳与你 提交于 2019-11-27 11:53:19
I have a problem with separators between UITableViewCell s in UITableView on iOS 9 . They have the significant left margin. I already have code for removing spacing introduced by iOS 8 but it doesn't work with iOS 9 . It looks like they added something else. I suppose it might be connected with layoutMarginsGuide but I haven't figured it out yet. Does anyone had a similar problem and found out the solution? Julian Król Okay, I have found out the solution . The only thing required for that is to set on the presenting instance of UITableView that flag cellLayoutMarginsFollowReadableWidth

iOS项目更新之升级Xcode7 & iOS9

杀马特。学长 韩版系。学妹 提交于 2019-11-27 11:32:45
前言 Apple 的WWDC所发布内容在给大家带来惊喜之际,给各位iOS开发的同仁却也带来了不同程度的麻烦。首先不讲新功能,就单指原来老版本的项目升级、代码升级,就是一堆问题,而且是不得不面临的问题。下面就跟着笔者一起来回顾下,此次在项目升级过程中,所遇到的各个问题点,以及解决方案,与各位已经做过和正在做iOS代码升级的同仁共勉,也给各位将要做Xcode 7和iOS9兼容的同仁以参考。 开发环境安装 原本运行得好好的项目,要升级Xcode7,首先就得安装Xcode7,具体的可以从开发者官网下载(目前最新版本是Xcode_7_GM_seed).下载好后,就双击下载好的dmg包,当然,前提还是需要我们的Mac环境升级到Mac OS 10.10.4+(图1.1),就可以打开Xcode安装镜像,如图1.2: 图1.1 Mac OS 更新示意图 图1.2 Xcode 7 GM安装 接下来,我们只要将图1.1所示的Xcode拖动到指定文件夹,即可完成安装,接下来,我们只要双击运行即可。 开发环境运行 各位可能会觉得,笔者在此还要讲开发环境的运行,是不是多此一举。其实并非如此,综合笔者这几年iOS开发经验的总结,运行新版本,特别是测试版本的Xcode是一个需要格外小心的事情,讲起来都是血泪史。 在运行 GM 版本Xcode时,我们需要特别注意以下几个方面: - 在运行GM版本Xcode前

iOS9 ATS: what about HTML5 based apps?

早过忘川 提交于 2019-11-27 11:22:30
According to the documentation from https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW14 , Apple forces to use HTTPS over HTTP in iOS 9. App Transport Security App Transport Security (ATS) lets an app add a declaration to its Info.plist file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing

How can I figure out which URL is being blocked by App Transport Security?

大城市里の小女人 提交于 2019-11-27 11:13:17
I'm upgrading an iOS app to iOS 9, and I have some URLs that are not secure, and I need a few exceptions to App Transport Security. I've added the two that I know about, but there are some warnings happening now stating: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. I need to know what URLs are being blocked so I can add them to the Info.plist, they're probably images or media files. How can I make the system log the URLs it decided not to load? Micah Hainline Editor Note

iOS 9 Safari: changing an element to fixed position while scrolling won't paint until scroll stops

ⅰ亾dé卋堺 提交于 2019-11-27 10:50:44
I've been developing a site and taking advantage from the rather good jQuery Sticky Kit plugin. It operates by switching the position property to fixed and back when appropriate. Runs very smoothly in desktop and acceptably so in mobile. Or at least it used to. iOS 9 comes with a new behavior: if the position of an element changes from static / relative / absolute to fixed while the scroll animation is ongoing the element becomes invisible until after the scroll has come to a stop. Oddly enough the opposite change (from fixed to whatever else) is performed without issues. A working example can

How to get monospaced numbers in UILabel on iOS 9

随声附和 提交于 2019-11-27 10:50:42
问题 At WWDC 2015, there was a session about the new “San Francisco” system font in iOS 9. It uses proportional number rendering instead of monospaced numbers by default when linked against the iOS 9 SDK. There is a convenient initializer on NSFont called NSFont.monospacedDigitsSystemFontOfSize(mySize weight:) that can be used to explicitly enable monospaced number display. However I couldn't find the UIKit equivalent for this on UIFont . 回答1: Handy UIFont extension: extension UIFont { var

setStatusBarHidden(_:withAnimation:) deprecated in iOS 9

夙愿已清 提交于 2019-11-27 10:08:45
问题 I see that in iOS 9 setStatusBarHidden(_:withAnimation:) is now deprecated and the documentation says to use [UIViewController prefersStatusBarHidden] instead but what is the alternative in iOS 9 if I still want to hide the status bar with a slide animation? 回答1: Refer to preferredStatusBarUpdateAnimation , Gif Code class ViewController: UIViewController { var isHidden:Bool = false{ didSet{ UIView.animate(withDuration: 0.5) { () -> Void in self.setNeedsStatusBarAppearanceUpdate() } } }

Global variable and optional binding in Swift

橙三吉。 提交于 2019-11-27 09:54:14
I have some quite simple doubt regarding optional binding,global variable & wrapping and unwrapping . Since I am new to SWIFT, its very important to understand the tits & bits of their concepts. 1) In Swift if I declare a global variable, I have 2 options either to make it optional or non optional, so let I am having 2-4 or more optional variables . So is it advisable to optional bind all those variables in viewDidLoad() method// so that I could use them without any problem of unwrapping and fatal error in my program. 2) Let me make myself more clear by the following example- I have 2 VC in my

XCode 7.3.1 hangs on “copying swift standard libraries”

我怕爱的太早我们不能终老 提交于 2019-11-27 09:45:34
Since I have updated to XCode 7.3.1, I'm not able to run my project because it hangs on the "Copying Swift standard libraries" step (both from IDE and command line). It also crashes if I try to open the project configuration file or if I create a new Swift project. Does anyone have idea why this is happening? I'm running XCode on Mac mini (late 2012) with OSX 10.11.6 SOLVED Finally solved reinstalling XCode and SDK. Thank you all for the answers. Open Keychain Access You may find a LOT of appleid certificates (1000+ of them) Delete all of those appleid certificates. Problem solved. Brendan I