ios8

UIView-Encapsulated-Layout with UICollectionView in UIViewController embed in view

不打扰是莪最后的温柔 提交于 2020-01-15 07:59:25
问题 For some reason, using a collection view inside a view controller which is embeded throws UIView-Encapsulated-Layout on the collection views constraints.. i can't set height or top/bottom margins, Any ideas as to why this happens? I've been adding constraints through storyboard, I've even tried adding them programmatically 来源: https://stackoverflow.com/questions/27714826/uiview-encapsulated-layout-with-uicollectionview-in-uiviewcontroller-embed-in-vi

UIView-Encapsulated-Layout with UICollectionView in UIViewController embed in view

你离开我真会死。 提交于 2020-01-15 07:59:10
问题 For some reason, using a collection view inside a view controller which is embeded throws UIView-Encapsulated-Layout on the collection views constraints.. i can't set height or top/bottom margins, Any ideas as to why this happens? I've been adding constraints through storyboard, I've even tried adding them programmatically 来源: https://stackoverflow.com/questions/27714826/uiview-encapsulated-layout-with-uicollectionview-in-uiviewcontroller-embed-in-vi

iOS8 Size-Classes and Popover Views

梦想的初衷 提交于 2020-01-15 07:10:29
问题 I had an issue with Popover on an iPad app I was working on recently...going to just post it here as I think it may help others. I'm using Xcode 6 and iOS 8 and Size Classes and the Popover View was built in a Storyboard. As my iPad App is in Regular/Regular Size Class all the time I built the Popover view in R/R too. No matter what I did with Constraints though, the popover just never looked right, it was a mess. So what was wrong?? 回答1: After some time the penny dropped to check the Any/Any

iOS8 Size-Classes and Popover Views

萝らか妹 提交于 2020-01-15 07:05:29
问题 I had an issue with Popover on an iPad app I was working on recently...going to just post it here as I think it may help others. I'm using Xcode 6 and iOS 8 and Size Classes and the Popover View was built in a Storyboard. As my iPad App is in Regular/Regular Size Class all the time I built the Popover view in R/R too. No matter what I did with Constraints though, the popover just never looked right, it was a mess. So what was wrong?? 回答1: After some time the penny dropped to check the Any/Any

iOS8 Size-Classes and Popover Views

你离开我真会死。 提交于 2020-01-15 07:04:17
问题 I had an issue with Popover on an iPad app I was working on recently...going to just post it here as I think it may help others. I'm using Xcode 6 and iOS 8 and Size Classes and the Popover View was built in a Storyboard. As my iPad App is in Regular/Regular Size Class all the time I built the Popover view in R/R too. No matter what I did with Constraints though, the popover just never looked right, it was a mess. So what was wrong?? 回答1: After some time the penny dropped to check the Any/Any

Swift Preserve UISwitch State on UILongPress

守給你的承諾、 提交于 2020-01-15 06:06:49
问题 I added in my project UILongPressGestureRecognizer on the UISwitch class ViewController: UIViewController,UIGestureRecognizerDelegate { var newSwitch:UISwitch! func CreateSwitchWithIndex(index:Int) { newSwitch = UISwitch() newSwitch.tintColor = UIColor.blackColor() newSwitch.tag = index+1; newSwitch.addTarget(self, action: Selector("switchSen:"), forControlEvents: UIControlEvents.ValueChanged) self.view.addSubview(newSwitch) newSwitch.setOn(false, animated: true) let newSwitchConstraintL =

AVCaptureSession addInput issues with ios8

蓝咒 提交于 2020-01-14 10:37:09
问题 I have an application with AVCaptureSession which work correctly with previous iOS versions, but then I tried run it on device with ios8, application crashed sporadic. but the problem wasn't solved. Exception getting in "[session addInput:input];" . Please advice how to resolve. Please verify my below code and im getting error in [session addInput:input]; Printing description of error: Error Domain=AVFoundationErrorDomain Code=-11852 "Cannot use Back Camera" UserInfo=0x17c076e0

Is it possible to change the view size of iOS 8 Action Extension?

懵懂的女人 提交于 2020-01-14 08:36:27
问题 I'm developing an action extension for iOS 8 at the moment. I want the view to be full screen, and it is on the iPhones, but not on the iPad, on the iPad my extension is presented in a small view in the middle. Is it possible to make it so that it's full screen on the iPad too? 回答1: After a bit of searching around I found all I needed to do was put [self setPreferredContentSize:CGSizeMake(760.0f, 1024)]; in viewDidLoad 回答2: This is the answer from apple's App Extension Programming Guide: 来源:

Autolayout is not updating frames instantly in iOS8-Xcode6

折月煮酒 提交于 2020-01-14 04:03:29
问题 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

Autolayout is not updating frames instantly in iOS8-Xcode6

可紊 提交于 2020-01-14 04:03:26
问题 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