ios8

Design app that supports both iOS8 and iOS7

大兔子大兔子 提交于 2019-12-09 15:16:12
问题 Suppose I want to design a master detail application, Xcode6 master-detail project template for universal app includes UISplitViewController and splitViewController is new in iOS8. I want to support app for iOS7 also. In general What is the best way to design an universal app using Xcode6 storyboard that support both iOS8 and iOS7 ? Is it better to use separate story board for different OS version ? What are the best practices we should follow to make app compatible with both OS? 回答1: The

iOS8: How do I make statusBar opaque after navigationBar is hidden using hidesBarsOnSwipe?

核能气质少年 提交于 2019-12-09 15:05:01
问题 I am building iOS8 app. On my tableview controller, I am using self.navigationController.hidesBarsOnSwipe = YES, to hide the navigationBar on swipe up gesture. It is working nicely, but my statusBar becomes transparent and shows the table content underneath. On storyboard, Status Bar are Top Bar are set to "Inferred" I want to: 1. Keep my status bar opaque 2. Maintain the same color as the navigationBar 3. Table content scrolls underneath the statusBar Thank you. 回答1: Here is a Swift solution

Can I use PushKit to do regular push with out using VoIP? Will it allow killed app to be launched in background if user does not act on notification?

﹥>﹥吖頭↗ 提交于 2019-12-09 14:19:52
问题 In the PushKit it is mentioned we can use regular push or VoIP push. But I did not find any documentation for what PKPushType to use for regular push. Did anybody try the regular push using the PushKit? If I don't use VoIP is it possible for a killed app to be launched in the background if it receives push notification? Meaning if app is killed and a notification comes and user does not act on it, can the app be launched by iOS in the background if I use PushKit? 回答1: Since iOS 13.0, this is

Location Service in UIWebView on iOS8 beta 5 not working

房东的猫 提交于 2019-12-09 13:48:11
问题 Yesterday we tried the developer previews iOS 8 beta 5 with Xcode 6 Beta 5 for our App. We use location services in the webview components of our hybrid app. I recognized that geolocating via UIWebView ist not working anymore. I verified this behavior with an example from scratch loading example for geolocation from the w3schools.com into a UIWebView. With iOS 7, (Base SDK 7.1, built with XCode 5), the notification for acceptance of the location service is prompted an after that, the app

How to beat NSMutableArray performance with Swift (beta) Array?

南笙酒味 提交于 2019-12-09 13:21:16
问题 In Swift, I'm trying to build a large collection of items. When creating elements in CoreData on-the-go, this is very speedy. However when trying to keep an index to those items, creating an array Swift has a large performance impact. The code below is a benchmark between NSMutableArray and Swift's Array. When ran in the iOS Simulator, the Swift Array is around 8x slower. Why is this, can it be improved, or should it improve over the as Apple releases new builds of Xcode/Swift? Code: var

iOS 64bit @try {… } @catch {…} not working

无人久伴 提交于 2019-12-09 13:15:50
问题 I have a very peculiar issue. Recently I added 64bit support to my iOS project (arm64), ever since doing that I started receiving uncaught exceptions for segments of my code inside @try...@catch (I'm using Crashlytics for crash reporting). I managed to reproduce the problem with the following lines of code anywhere in my app (I wrote them inside init of one of my view controllers): @try { NSMutableDictionary *m = [[NSMutableDictionary alloc] init]; NSString *s; m[s] = @"poop"; } @catch

SceneKit won't scale a dynamic body

笑着哭i 提交于 2019-12-09 13:07:29
问题 I have a sphere that is a dynamic body. I would like to animate the scale of this sphere so that it grows in size: let sphere = SCNNode(geometry: SCNSphere(radius: 1)) scene.rootNode.addChildNode(sphere) sphere.physicsBody = SCNPhysicsBody.dynamicBody() sphere.runAction(SCNAction.scaleTo(10, duration: 1)) However, this does not seem to work. The sphere falls down due to gravity, but stays the same size. If I comment out the line that gives the sphere its physics body, then the scaling

Xcode6: Is there any easy way to copy constrains between size classes?

为君一笑 提交于 2019-12-09 12:36:50
问题 I setup constrains in wAny hAny size class, and it worked on iPhone & iPad simulators. Then I switched to wAny hCompact size class and made some changes It looks good in iPhone landscape mode, but change nothing in iPad, because iPad is wRegular hRegular. I try to apply these constrains to wRegular hAny size class, but can't find a quick way to do that. It makes no sense to manually modify all the constrains again. I found that if I double click a constrain in Inspector panel, there's a

iOS 8 custom UIActivity image black background color

夙愿已清 提交于 2019-12-09 11:46:36
问题 I am trying to add a custom UIActivity of type UIActivityCategoryAction to UIActivityController . But in iOS 8, all of them are appearing with a black background. Is there a way to change this? 回答1: There are 3 things to note here: image background, image opaqueness, image size. iOS 7 Image background : Image background should be transparent. image opaqueness The "visible part" of the icon should be non transparent aka opaque. Note that any color information won't be preserved : image size

Sending images with iOS 8 custom keyboard?

馋奶兔 提交于 2019-12-09 11:15:24
问题 I've been developing a custom keyboard for iOS 8, but stumbled upon a problem trying to send images using the keyboard. I did some research and it seems like there isn't a simple way to do this with UITextDocumentProxy because only NSStrings are allowed. Am I either overlooking any simple ways to use a custom keyboard to send images and/or is there any way to work around this issue? Thanks in advance 回答1: Apparently, you are not the only person to try a keyboard like this. If you look at the