xcode6

Use present as popover in a universal storyboard

情到浓时终转凉″ 提交于 2020-01-02 09:29:13
问题 Apple recommends to use a single storyboard for universal apps through size classes. Now I am trying to adapt the UI depending on the device, which has worked quiet well so far. The only problem I'm facing is how to assign the specific segues. For instance the settings, which in my App consist of only two tableview cells, should be made visible via a "present as a popover" on the iPad and a regular "show (e.g. Push)" segue on the iPhone. Is there any way to define it just like that using

How to see assembly code in xcode 6

久未见 提交于 2020-01-02 08:21:45
问题 How to see assembly code generated by compiler while running application using iOS device in xcode 6.What are the settings i should enable in xcode to see assembly code? 回答1: In Xcode Options, Select the option Debug->Debug WorkFlow-> Always Show Disassembly Put break point in the code where you want to see assembly code. Then you can view assembly code when code reached to that breakpoint. 来源: https://stackoverflow.com/questions/27187093/how-to-see-assembly-code-in-xcode-6

How to import Zbar Framework in Swift Project

三世轮回 提交于 2020-01-02 07:09:10
问题 I have a project and currently trying to convert to Swift project but I couldn't figure out how to present a Zbar barcode reader that scans from the camera feed. On my current project I called like this - (IBAction)scanButton:(id)sender { // ADD: present a barcode reader that scans from the camera feed ZBarReaderViewController *reader = [ZBarReaderViewController new]; reader.readerDelegate = self; reader.supportedOrientationsMask = ZBarOrientationMaskAll; ZBarImageScanner *scanner = reader

Google plus sign-in for xcode share extension

谁说我不能喝 提交于 2020-01-02 07:05:17
问题 I’m writing an iOS app to share web page links by email, and as part of it I want users to be able to sign in to google plus. I’ve got the containing app working fine using the instructions from here: https://developers.google.com/+/mobile/ios/sign-in and now I’m trying to add a share extension that can also access the user’s google+ profile. I started off by trying to add the sign in button in to the share extension, but I don’t think that’s going to work because after clicking the button

In Xcode 6 Beta 4 stroking with SKShapeNode doesn't work anymore

流过昼夜 提交于 2020-01-02 05:45:21
问题 In Xcode 6 beta 2 it worked fine, but in beta 4 it doesn't work anymore. Does anyone know what's behind this mystery? let circle = SKShapeNode(circleOfRadius: 125); circle.strokeColor = UIColor(red: 255, green: 255, blue: 255, alpha: 1.0); circle.lineWidth = 4 self.addChild(circle); In beta 4 nothing can be seen. Thanks for your help in advance. 回答1: This is a common issue with Xcode 6 Beta 4 when using the simulator. It renders fine when using an actual device . See this developer forums

OSStatus error 2003334207 while re-buiding the App from Xcode 6

我是研究僧i 提交于 2020-01-02 02:33:27
问题 I am using AVAudioPlayer to play recorded audio which is saved in Iphone's Document directory. When I first record an audio and then play, it works fine (Device is connected to the system and App is running through Xcode). But when I Stop the running App through Xcode and again run the App through Xcode, I am getting Error Error Domain=NSOSStatusErrorDomain Code=2003334207 "The operation couldn’t be completed. (OSStatus error 2003334207.)" File Location: file:///var/mobile/Containers/Data

UIWindow frame in ios 8 different from ios 7 in Landscape

此生再无相见时 提交于 2020-01-02 02:18:28
问题 I've create simple module where I add subview to UIWindow. In simulator ios 7(Xcode 5.1.1) I have printed self.windows and I get: <UIWindow: 0x8db1670; frame = (0 0; 768 1024); autoresize = W+H; gestureRecognizers = <NSArray: 0x8db1a70>; layer = <UIWindowLayer: 0x8db17d0>> but on ios8 (Xcode 6 beta 6) I get: <UIWindow: 0x794320d0; frame = (0 0; 1024 768); gestureRecognizers = <NSArray: 0x79437a80>; layer = <UIWindowLayer: 0x7943c400>> The question is: why there is a difference in frame

Subclassing UIAlertController and encountering runtime errors

萝らか妹 提交于 2020-01-01 12:07:38
问题 I'm new to programming for iOS and OSX, and decided to start with Swift and use the iOS8 API's for a test app and attempt some programming techniques I use in other environments. However, I'm encountering a strange situation which I hope someone could identify and help me with. This involves difficulties subclassing UIAlertController. This was my first attempt: import UIKit class FubarAlertController: UIAlertController { convenience init (message:String) { self.init(title: "Alert", message:

Subclassing UIAlertController and encountering runtime errors

大憨熊 提交于 2020-01-01 12:07:07
问题 I'm new to programming for iOS and OSX, and decided to start with Swift and use the iOS8 API's for a test app and attempt some programming techniques I use in other environments. However, I'm encountering a strange situation which I hope someone could identify and help me with. This involves difficulties subclassing UIAlertController. This was my first attempt: import UIKit class FubarAlertController: UIAlertController { convenience init (message:String) { self.init(title: "Alert", message:

How to use size class to make app compatible to iphone 5, iphone 6, iphone 6 plus

放肆的年华 提交于 2020-01-01 09:15:18
问题 I am using size class for making my app compatible for iPhone 5, iPhone 6 and iPhone 6 plus. I am using compact width Regular height for this : Is this the correct way for using the xib or storyboard and making the other things leave on iOS ? Or, do i need to have some other things needed to be added ? It is showing perfectly in all devices without using Auto-layout. Do I need to do some more changes ? Do i need to add 3X images in my resource folder ? What is the best way to do the same ?