xcode6

Terminating since there is no system app?

只谈情不闲聊 提交于 2019-12-06 18:56:51
问题 Has anyone been experiencing the error message "Terminating since there is no system app" lately in XCode? I have a CoreAudio app (built with The Amazing Audio Engine framework) running on iOS 8.1 and XCode 6.1. Since XCode 6.1 (or/and iOS 8.1) my app randomly crashes (generally not long after starting to run) and my iPad displays a black screen with the white apple logo. Like the boot up screen but only for a few seconds. Then the ipad goes back to the locked screen. The log windows says :

UITableViewCell subviews report incorrect width when using size classes

99封情书 提交于 2019-12-06 18:51:56
问题 For some reason, when using size classes in xcode 6, I am getting incorrect widths for subviews in my cell. I have a UIImageView with autolayout for sizing (constant: 10 for top, L/R, bottom). When calling the following from tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) : println("w: \(cell.mapSnapshotImageView.bounds.size.width) h: \(cell.mapSnapshotImageView.bounds.size.height)") I always get: w: 580.0 h: 80.0 Even though it should be w: 300.0 h: 80.0

Change color of accessoryType Swift

筅森魡賤 提交于 2019-12-06 17:36:28
问题 I'd like to change the color of my cell accessoryType from blue to white. The textColor is already set to white. Does someone of you guys know how to do this? My Code: cell!.accessoryType = UITableViewCellAccessoryType.Checkmark 回答1: You can set your UITableViewCell tintColor property to the desired color: [cell setTintColor:[UIColor whiteColor]]; 回答2: Swift: cell.tintColor = UIColor.whiteColor() Swift 3.0 cell.tintColor = UIColor.white 回答3: The best way to do that, i think, is to set

NSLayoutConstraint in swift

送分小仙女□ 提交于 2019-12-06 17:07:40
问题 I am trying to convert the following code to Swift: leftConstraint = [NSLayoutConstraint constraintWithItem:self.contentView attribute:NSLayoutAttributeLeft relatedBy:0 toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; [self.view addConstraint:leftConstraint]; Can someone give me the new syntax to do it in Swift? 回答1: Copy & paste from the documentation: convenience init(item view1: AnyObject!, attribute attr1: NSLayoutAttribute, relatedBy relation: NSLayoutRelation

google cardboard application in ios without using unity

倖福魔咒の 提交于 2019-12-06 16:25:50
问题 I'm trying to make a spherical 360 video in my ios app with the Google Cardboard SDK.I have seen that all tutorials and samples talking about unity. I am not familiar with unity or GL.Is there any way to do this without using unity ? 回答1: Yes there's now an official SDK for iOS that doesn't require Unity. https://developers.google.com/cardboard/ios/ Also for a simple 360 video player, check out VR View: https://developers.google.com/cardboard/vrview 回答2: You can try EleVR the web player seems

Autolayout is not updating frames instantly in iOS8-Xcode6

心不动则不痛 提交于 2019-12-06 16:14:20
I'm using autolayout in XCode6 . I have applied the following constraints to a scrollview . I have tried to access the frame of this scrollview in - viewDidLoad and - viewWillAppear methods for iPhone 4Inchs device. Here problem is, the scrollview's width is showing 600 in Log. But the width should be 300 in 4Ichs device as i'm using autolayout . Seems autolayout will apply after some time interval. It is showing correct width in - viewDidAppear method as 300. Is there any way to access the original frames in - viewDidLoad and - viewWillAppear methods ? Thanks in advance. Auto layout doesn't

JavaScript not passing arguments το WindowScriptObject?

淺唱寂寞╮ 提交于 2019-12-06 16:09:11
First off, let me tell you that I've used webviews in Cocoa like 100 times. However, I have no clue as to what goes wrong... Here's the JS part: window.objc.log_("Selected Element!"); And here's the Objective-C part: - (void)log:(NSString*)msg { NSLog(@"JS: %@",msg); } And here's the output: JS: (null) What's going on? P.S. The WebView's windowScriptObject has been correctly set and isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript: have been defined. (The function wouldn't be called at all anyway, if they weren't set...) 来源: https://stackoverflow.com/questions/26526045

How to set iOS Simulator Language when launching via simctl

南楼画角 提交于 2019-12-06 15:51:21
I am launching my app in the simulator using xcrun simctl . I would like to be able to set the language that the simulator launches with (ie. switch to French on one run, to Englash on another). Is there an option to do that? It used to be possible to use -AppleLanguages option to the Simulator, but that no longer appears to work (since Xcode 5.x). Just figured this out myself: xcrun simctl launch <deviceid> <appid> -AppleLanguages "(en-GB)" or xcrun simctl launch <deviceid> <appid> -AppleLanguages \(en-GB\) When you use the -AppleLanguages as a launch argument in the scheme, it expects the

IOS & Objective C - how can i resolve this error “implicit declaration of function ”class_getname “ is invalid in c99”?

笑着哭i 提交于 2019-12-06 13:51:48
问题 Actually there are two errors, the first one is : "implicit declaration of function "class_getname " is invalid in c99" The second one is : incompatible integer to pointer conversion initializing 'const char*' with an expression of type 'int' my method is : -(void) donneesrecoltees:(NSData *)donnees { NSError *erreur; NSNumber *lastMessage,*currentMessage; //int i; NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; NSString *msg; UIAlertView *alert; NSDictionary *json=

update tab bar height in iOS 7/8 from iOS 6 - UITabBar

我只是一个虾纸丫 提交于 2019-12-06 12:58:41
问题 I am updating an app that was written for previous iOS (5/6). I have updated the icons for the tab bar; according to the Apple requirements (Icon and Image Sizes) they are 50x50p for all devices except the iphone 6 plus. Unfortunately also my tab bar is 49 pixels in height (keep still the iOS6 size) and the icons cover its entire space. This tab bar (UITabBar) was created in the Interface builder but I am not able to change "size inspector" values. iOS 6/7 Deltas values don't do anything. I