ios9

WKwebview : Cannot view app documents images in app web view iOS swift

风格不统一 提交于 2019-12-12 03:30:45
问题 I am trying to load images from app documents directory(image were downloaded in app) in wkwebview. Is there any limitations in wkwebiview or any permission problem? Eg Image url: file:///private/var/mobile/Containers/Data/Application/34EDAFAD-F0CD-4A63-8B2E-74BB370C71DF/Documents/00286863-49ED-4C4D-8E36-106098DA5D72.jpeg Can anyone help me out? 回答1: Are you using - loadRequest: to load the local file? It is a known issue that it doesn't work for local files. If you can use iOS 9 APIs, use -

Prefer swipe to delete over a competing swipe gesture

天大地大妈咪最大 提交于 2019-12-12 03:23:20
问题 So I have a tableViewController inside a XLPagerTabStrip view controller, basically a pod which allows me to swipe between child view controllers left and right. The problem is that I want to disable the view controller scroll when the user swipes on a cell on my tableView. In this case I want him to be able to see the delete option, instead of changing the viewController itself. Is this possible? Currently, I see the delete button only if I swipe really, really fast and in all other

Swift/XCode 7: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

≯℡__Kan透↙ 提交于 2019-12-12 03:19:44
问题 I have created a self signed certificate with openssl and sha 256 like the following: openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout server.key -out server.crt and I've installed it correctly in my AMPPS server by configuring httpd-ssl.conf file. If I try to perform, on a web browser: https://localhost I correctly see that connection uses TLS 1.2. When I run my app under iOS 9 simulator, I guess that error (9813) is raised because my certificate is self signed. Is there a

Error when trying to store random element from array in variable Swift 2

房东的猫 提交于 2019-12-12 03:18:13
问题 I have an array of area codes and I am trying store a random element from the array in a variable and I get an error "instance member 'areaCodes' can not be used on type 'ViewController' ". Any suggestions? var areaCodes = [209, 213, 310, 323, 408, 415] var firstThree = areaCodes[Int(arc4random_uniform(UInt32(areaCodes.count)))] 回答1: You can not access your array at initialization time. Change your property to a read only computed property: var firstThree: Int { return areaCodes[Int

IOS9 and uiwebview issues?

你。 提交于 2019-12-12 02:46:21
问题 I have webview working fine for version less then ios9, but seems not working for ios9, and its shows me a blank page, but the url is passed. 回答1: To configure a per-domain exception so that your app can connect to a non-secure (or non TLSv1.2-enabled secure host), add these keys to your Info.plist (and note that Xcode doesn’t currently auto-complete these keys as of the first Xcode 7 beta seed): <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com

Invalid capability and invalid name with custom keyboard

試著忘記壹切 提交于 2019-12-12 02:26:27
问题 I've designed a custom keyboard for the use of my own application only. That's why in fact, I didn't use UIInputViewController but only UIViewController (and set a delegate to the custom text field which is actually a subclassed UIScrollView ). When I call becomeFirstResponder() on my text field, it takes incredibly long (not only the first time but each time I call this function) until the keyboard actually appears (around 2 seconds). Furthermore I get the following error messages:

Multiple UIVIew Autolayout issue

拈花ヽ惹草 提交于 2019-12-12 01:37:59
问题 I have an UIViewController with four subviews its look like below picture first subview is 50% of the screen and remaining three subviews occupy the remaining 50% of the view.In the bottom first 25% its will occupy the 2:1 ratio range.remains are occupy by 25% of the view.it's will be positioning the ipad landscape view properly but in portrait view first view more than 70% occupy. how to resolve this 回答1: I've created the setup according to what you want. Please check the below screenshots.

MapKit adding multiple annotations from core data

爱⌒轻易说出口 提交于 2019-12-11 23:07:26
问题 This is my code. It loops for the number records in the database but only retrieves the first records lat and lon. func fetch() { let appDel: AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate let context: NSManagedObjectContext = appDel.managedObjectContext! let freq = NSFetchRequest(entityName: "Mappoints") let fetchResults = try! context.executeFetchRequest(freq) as! [NSManagedObject] self.mapView.delegate = self myData = fetchResults myData.count for _ in myData {

Force to zoom app in iOS9

ε祈祈猫儿з 提交于 2019-12-11 21:31:28
问题 I have an app that in iPhone 6 I want it to be scaled proportionally and zoomed. Basically I want to imitate the Applied ZOOM from Settings. At the moment, when I run the app with the Zoom mode from Settings, everything works fine but when I run it without that Zoom from Settings, the views displayed are smaller. How can I fix it? 回答1: From Apple's What's New in iOS documentation: To let the system know that your app supports the iPhone 6 screen sizes, include a storyboard launch screen file

读书笔记Beginning iOS 9 Programming with Swift

吃可爱长大的小学妹 提交于 2019-12-11 15:46:08
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 见 http://www.cyper.me/2016/06/15/beginning-iOS-9-programming-with-swift/ http://www.cyper.me/2016/06/19/begining-iOS-9-programming-with-swift-part-2/ http://www.cyper.me/2016/06/20/begining-iOS-9-programming-with-swift-part-3/ http://www.cyper.me/2016/06/22/begining-iOS-9-programming-with-swift-part-4/ 来源: oschina 链接: https://my.oschina.net/u/113421/blog/691542