ios-autolayout

Navigation Title View Issue in iOS 11

拟墨画扇 提交于 2019-12-25 08:49:38
问题 I am facing an issue on Navigation bar items in iOS 11 as below screen shot and the two bar button also not executing any button actions. It is working perfectly on iOS 10.x.x and below with same auto layouts and size. Following screenshot is showing how custom Navigation bar IB implemented. . I tried with following codes too.. if (@available(iOS 11.0, *)) { [[self navigationController] navigationBar].prefersLargeTitles = NO; [[self navigationController] navigationItem].largeTitleDisplayMode

Xcode 8 - Autolayouts Issue

与世无争的帅哥 提交于 2019-12-25 08:34:57
问题 I am setting up basic UIView subclass with the new Xcode and came across weird behaviour. The subclassed view appears to load normally at the first glance: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self baseInit]; } return self; } - (void)awakeFromNib { [super awakeFromNib]; [self baseInit]; } I started to build another container view in storyboards set to size of iPhone 6 as I own one. I had a bit complicated layout with quite few objects and even

How to programmatically animate the alignment property of an UIStackView in ios 9

跟風遠走 提交于 2019-12-25 05:13:55
问题 I want to know how can I animate a change in the alignment property of an horizontal UIStackView say from UIStackViewAlignmentCenter to UIStackViewAlignmentTop and vice versa, and I want to visually reflects this change at the same time. EDIT: What I have: This is my hierarchy of views: two buttons named b1 and b2; b1 has an action named "changeAlignmentToTop" and b2 has an action named "changeAlignmentToCenter", which are activated Upon touch Up Inside in the respective button. an UIView

Reordering Custom Cell Causes the Constraints to get Messed Up

删除回忆录丶 提交于 2019-12-25 02:35:13
问题 I have a custom cell which has a reordering problem that looks like this: Whenever I try to change the position of the cell, a weird thing happens, where the constraints break and half of the cell goes off screen then, when I exit editing mode, the cell diminishes into a small rectangle in the middle of the place where the cell used to be. This is the console message which comes when I try to reorder a cell. Unable to simultaneously satisfy constraints. Probably at least one of the

Reordering Custom Cell Causes the Constraints to get Messed Up

与世无争的帅哥 提交于 2019-12-25 02:35:08
问题 I have a custom cell which has a reordering problem that looks like this: Whenever I try to change the position of the cell, a weird thing happens, where the constraints break and half of the cell goes off screen then, when I exit editing mode, the cell diminishes into a small rectangle in the middle of the place where the cell used to be. This is the console message which comes when I try to reorder a cell. Unable to simultaneously satisfy constraints. Probably at least one of the

Swift 4.2 SafeAreaLayoutGuide frame is the same as view.frame on View Did Load

て烟熏妆下的殇ゞ 提交于 2019-12-24 21:06:17
问题 I'm using safearealayout guides, programmatically (i.e.) without storyboards. I want to access the safeAreaLayoutGuides , layoutFrame size within my app but don't know when to call it. If you call on viewDidLoad , the size returned is the same as the full view.frame size . When does the app catch up and readjust? My full app has 5 screens within a menubarcontroller . The first screen loads with content constrained to view.topAnchor when I've activated view.safeAreaLayoutGuide.topAnchor . If

Top space on device rotation

荒凉一梦 提交于 2019-12-24 07:59:37
问题 I have the following constraints on my UIView in portrait mode: And landscape: This is screenshot of the ViewController when I open it first time: Top space is OK. Then I'm rotating the device to landscape: Do you see that white space on the top? And when I'm rotating it back to landscape, the space still stays: Why and how to fix it? 回答1: Try to uncheck Adjust scrollview insets Of viewcontroller attribute Source Of Image: Here 回答2: You might have set TopConstraint of your view With margin.

Is it necessary to use autolayout to use stackview

我的梦境 提交于 2019-12-24 02:16:39
问题 Is it necessary to compulsory use autolayout to just use of stackview suppose i have made whole project without autolayout, now for particular screen i have to use the Stackview to equally divide the number of label inside the view. is there is any solution for that.. PROBLEM actually i have to customize one of my old project done without autolayout, Now i have to just modify one screen which does not require any constraint but just stackview like uitablecell with 8 label in each cell equally

Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread

為{幸葍}努か 提交于 2019-12-23 10:21:56
问题 I am getting this crash after converting an existing UIViewController to Auto Layout and I can't figure out what is causing it. I did search for dispatch_async(dispatch_get_global_queue(...)) calls but none changes layout. The stack trace is also very unhelpful: * thread #18: tid = 0x73617, 0x0000000183aa8524 libobjc.A.dylib`objc_exception_throw, stop reason = breakpoint 3.1 * frame #0: 0x0000000183aa8524 libobjc.A.dylib`objc_exception_throw frame #1: 0x0000000185071100 CoreFoundation`+

Auto layout of a Child Container that embeds a UIViewController

£可爱£侵袭症+ 提交于 2019-12-23 10:17:50
问题 My main scene shows a child UIViewController , by putting a Child Container in its View, and embedding a child UIViewController in that Child Container. I do that by ctrl-dragging from the Child Container to the child UIViewController in the storyboard , and choosing the "embed" segue. That lets me encapsulate and reuse the child UIViewController elsewhere. I think that is fairly standard. But I can't get it to auto layout properly. I've made a simple test case to demonstrate this: https:/