Tagged Questions
Auto Layout is a constraint-based, descriptive layout system for OS X and iOS development.
0
votes
0answers
13 views
Autolayout messing up transform animation
I am using auto layout for most of my views. I have an animation on a few of my views' transform. Every time that animation on the transforms is run, the origin of each view is adjusted and I don't ...
1
vote
2answers
24 views
setNeedsLayout relayouts the cell only after is has been displayed
I have a table view with cells, which sometimes have an optional UI element, and sometimes it has to be removed.
Depending on the element, label is resized.
When cell is initialised, it is narrower ...
0
votes
1answer
28 views
Layout broken when viewDidDisappear
I Wear several days trying to solve the following problem but I have not gotten anything :(
I have a viewController with a UIScrollView and some subViews, I'm adding some of them by interface ...
0
votes
2answers
37 views
IOS: In auto layout, when the frame of a view setted?
We do not need to set frame of views by ourself if autolayout is enabled. Auto layout can help us calculate size and origin for views. We can get the frame in the controller method "viewDidAppear". ...
0
votes
3answers
13 views
ios - 3.5" layout cutting off bottom of screen
I have an app that is cutting the bottom toolbar off for a 3.5" screen (the add or update photos bar in screenshots below). For a 4" screen everything works perfectly.
This only happens when i run ...
0
votes
1answer
37 views
How can I program iOS AutoLayout constraints using Greater Than or Equal without making the layout ambiguous?
I am writing an iOS app using MonoTouch where I want to programmatically define all of my UIViews and the AutoLayout constraints that define their layout. I am currently trying to create a Table-like ...
0
votes
0answers
30 views
Use auto layout by code, work fine in iOS 7 but crash when iOS 6
I develop my app in XCode 5, and I create my view controller(UIViewController instance) in storyboard. And I add a UITableView as its' subview, after that I create a custom tableview cell.
Then, in ...
0
votes
0answers
8 views
UIScrollView + Autolayout + Interface Builder: No scrolling, extra space at top after bounce
I'm attempting to embed several sets of buttons and labels in a scroll view using Interface Builder and autolayout. I've tried nearly every solution I can find but nothing gets the scroll view ...
3
votes
2answers
38 views
How to use Auto Layout with container transitions?
How can you use Auto Layout with the UIViewController container transition method:
-(void)transitionFromViewController:(UIViewController *)fromViewController
...
0
votes
2answers
33 views
UITableView in UIScrollView loads all cells
I currently have a view, uisegmentedcontrol, and another view all inside of a scrollview. The last view swaps between two uitableviews based on the selected index in the uisegmentedcontrol. To make ...
-1
votes
1answer
39 views
iOS Autolayout : Dynamically adjust controls
I am practicing autolayout, I have struck on some issue, My layout is like
== Username TextField ==
== Password Textfield ==
==Login Button ==
But when user enters wrong username or password it ...
0
votes
0answers
18 views
How to let Ad BannerView fit its size to its content automatically with AutoLayout?
I am working on Xcode 4.6.3(with iOS 6.1 SDK) to create an iPhone app. This app supports Portrait, Landscape Left and Landscape Right modes. I've added an Ad BannerView to the main storyboard. Xcode ...
0
votes
0answers
5 views
iOS 6/7 Autolayout - Moving Content under keyboard not working
I'm trying to move up a UITextField from behind the keyboard when selected and I've been following Apple's proposed method described here: iOS: setContentSize is causing my entire UIScrollView frame ...
1
vote
3answers
30 views
How can I add padding to the intrinsic content size of UILabel?
I'm using autolayout on iOS7 and I have a problem like this:
I'm putting a UILabel onto a UIView and I'm arranging my autolayout constraints so that the label's centerX = parent view's centerX. I'm ...
0
votes
1answer
20 views
localization for Arabic / Autolayout
I shocked when I run my app in device (which its language is Arabic) that objects suppose to be to right direction are get to left and vide versa.
I realised later that the auto layout with Arabic ...
0
votes
1answer
41 views
Springs in Auto Layout: Distribute views evenly, with constraints, in Xcode 5
I understand the old Struts and Springs method of aligning, sizing and distributing views in Interface Builder. However, I cannot seem to figure out how to evenly distribute views using auto layout ...
0
votes
1answer
15 views
Autoresize View When SubViews are Added
I am developing an app using iOS 7 and auto layout. I am adding a simple textfield to a UIView. But the view is not getting resized. I even tried to change the frame manually but it did not work. I ...
-2
votes
1answer
31 views
Confused by conflicting autolayout constraints
I got this crashlog when I click on tabbar tabitem to change viewcontroller:
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you ...
0
votes
2answers
39 views
How to find out whether Auto Layout was used to make a Storyboard or Xib
In iOS, is there a way to programmatically find out whether a storyboard, or xib, has been defined using Auto Layout or Springs & Struts?
This would be useful when writing a method which needs to ...
0
votes
0answers
38 views
How to change imageview (Any object) height using Autolayout in iOS? [on hold]
Below Image into set imageview using AutoLayout in 4 inch screen (iPhone5).It's working fine. Bit i want to make compatible with 3.5 inch screen (iPhone4). 3.5 inch screen into only i want to change ...
0
votes
1answer
6 views
AGSMapView & Autolayout
I'm sorry if this is a double post, or if I didn't read the documentation properly, but does AGSMapview supports working with Autolayout in iOS6/7 and storyboard? I tried enabling Autolayout only to ...
0
votes
1answer
19 views
Can a xib in a project use autolayout while the main storyboard doesn't?
The subject says it all.
I would guess that the answer is "yes" since Xcode saves the xib and the storyboard independently. The question is, if this also works correctly while runtime or if there are ...
0
votes
1answer
29 views
AutoLayout height based on subviews
I've tried many solutions, but can't get UIScrollView to resize by it's subviews.
Error:
(
"<NSLayoutConstraint:0x16e71240 V:[RouteView:0x16d76fd0]-(10)-[RouteView:0x16e6fbb0]>",
...
0
votes
0answers
11 views
Autolayout is not resizing Uicollectionviewcell items when animating between layouts
I have a uicollectionview cell with an image view inside that I want to resize when I switch to a larger 'zoomed in' layout.
I have placed constraints inside the cell that does resize the image view ...
0
votes
1answer
24 views
Autolayout - How to align with longest item
Suppose I have a view that contains two columns of objects. The first column contains labels, and the second column contains, say, sliders. I want the sliders all to align left with each other. I want ...
0
votes
1answer
12 views
Auto layout: how to set the hugging & resistance priority for two multi-line UILabel stacked vertically?
I've already implement a custom cell using auto layout like this:
It has 4 parts as you can see: [thumbnail, title, summary, feedName].
I need to layout title & summary beautifully. They're ...
0
votes
0answers
25 views
Switching between Auto Layout ON / OFF, in different ViewControllers?
I have a scrolling view, where I need Auto Layout turned ON to accomplish what I want. But Auto Layout is giving troubles in my second ViewController, and therefor turned OFF.
Is there any problem ...
1
vote
1answer
20 views
Auto Layout of a NSView in a NSScrollView embedded in a NSSplitView
I can't seem to figure out how to get the content inside a NSScrollView to scale properly. I have come across a few references which describe general approaches, but nothing concrete.
Ambiguous ...
0
votes
1answer
24 views
Autolayout constraints not working
I'm trying to follow the Autolayouts tutorial here and configured my View to have all the constraints from the tutorial yet, my actual view, when rendered, looks like crap.
Constraints:
Rendered ...
0
votes
1answer
17 views
-[NSTextField intrinsicContentSize] always has undefined width
I'm pulling hairs here. I have an NSTextField created on a xib that has an intrinsicContentSize adjusted to it's stringValue.
If I create a textField programmatically like so:
_textfield = ...
1
vote
0answers
9 views
topLayoutGuide not updated after Rotation
I have a viewController (mainView) that supports every orientation on iPhone.
From this view, another viewController is presented with modal style, which only supports only Portrait orientation (and ...
0
votes
1answer
42 views
AutoLayout UIScrollView Content Does Not Resize On Rotation (incl. sample project)
I'm trying to wrap my head around AutoLayout works and I think I understand most of it except for UIScrollViews. When I add those views to a project, they refuse to expand the dimensions of the ...
1
vote
3answers
99 views
Xcode 5, how to use autolayout with orientation, in the shown scenario?
I'm struggling with AutoLayout, to arrange two buttons as shown below.
I've watched the initial 2012 WWDC video and the Xcode-5 WWDC update video.
Also various other videos and tutorials.
I'm having ...
0
votes
0answers
13 views
OS X auto-layout prevents window resizing
One for the auto-layout gurus out there: I don't understand why the following auto-layout setup prevents resizing of the window.
I have three views organized this way:
-----------------
| ...
0
votes
2answers
45 views
Auto Layout to dynamically size uilabel width
So I have two UILabels side by side in Storyboard. The second label should butt up against the right edge of the first one (trailing constraint of 1), but I also need the first label (the one on the ...
0
votes
0answers
34 views
UITableview not expanding with auotlayout
I have designed xib with 3.5inch and placed one UITableview. While running in 3.5 its coming in the same size,but in 4 inch UITableview is not expanding.I have tried with changing the TableView height ...
0
votes
0answers
21 views
UIScrollView with autolayout pure approach [duplicate]
EDIT: I managed to get it to work, starting from sratch. But i still don't understand why it won't work in another place. I'll check again later. I close the question.
i tried to implement what is ...
0
votes
0answers
45 views
How to combine many labels in fixed size system?
I’m developing an app for ios using xcode. I’m trying to use autolayout to support landscape orientation. The problem is that I have a lot of labels that must be on constant space between them. If ...
0
votes
1answer
37 views
iOS7 auto layout, constraints, compression, content hugging
I’m having bit of a tough time getting my head around auto layout, constraints, priorities, compression and content hugging.
I think I understand it but getting it to play nicely seems to be ...
0
votes
1answer
18 views
Centring a NSScrollView's document view like Preview.app?
I am asking a question almost exactly the same as Trouble with autolayout on NSScrollView's document view. The solution of this question was to set translatesAutoresizingMaskIntoConstraints to NO ...
0
votes
1answer
30 views
How to Postion Button in bottom using Autolayout?
I have UIScrollView on ViewController view and I want to keep button in bottom on scrollview.But it's not positioned as per device height like 4" and 3.5".I have applied autolayout shown in below pic.
...
0
votes
1answer
61 views
UISearchDisplayController Results Table Overlapping UISearchBar
I'm having a strange issue with my UISearchDisplayController. When the search display activates the frame of the background fading view and the tableview are incorrectly overlapping the UISearchBar. ...
0
votes
1answer
66 views
iOS 7 Auto Layout - Ignore In-Call Status Bar
Using Auto Layout constraints, I am trying to set up a subview with a vertical position that never changes, even when the in-call status bar (or some other non-standard status bar) is showing. I don't ...
0
votes
2answers
38 views
iOS programmatically generated view has hidden constraints causing conflicts with auto layout
This is a very basic view that links to a view controller. The view has a single UILabel that is placed with coded constraints. The code actually runs correctly, but the console is registering a ...
0
votes
2answers
60 views
Using Auto Layout with Dynamic UITextView, UIImageView, and UILabel Heights
I am trying to create a view that contains one image view with 2 labels and text views. The contents of each element will be read in from an SQLite database, so I would like to use Xcode 5's auto ...
0
votes
1answer
69 views
iOS: Autolayout flexible margins
I have a UILabel object in my UIView. I want to let this lable moving respectively when its super view size changes. This is like the old UIViewAutoresizingFlexibleTopMargin, ...
5
votes
2answers
107 views
Creating an autolayout-based metrics view
I have a reusable view I will be using in UITableViewCell's and UICollectionViewCell's, and need to get its dimensions for tableView:heightForRowAtIndexPath:. Some subviews have stuff going on inside ...
-1
votes
0answers
31 views
Dynamic UILabel and Dynamic UIScrollView with AutoLayout
I have an UI like the below code, and now I want to use autolayout to implement it. How?
- (void)setupScrollView {
scrollView = [[UIScrollView alloc] init];
label = [[UILabel alloc] ...
0
votes
0answers
48 views
AutoLayout With Optional Content Sections (Need to find minimum vertical content size)
I'm hoping someone can help me out with this problem. I have a very tall view with three different content section. For the sake of simplicity I will say that the UIView in Interface Builder is 1000px ...
0
votes
3answers
40 views
Place a label on the bottom of the screen
I made the following code to get a label on the bottom of the screen, depending if the device is a iphone5 or iphone4/4s.
I like to know I there is another way.... for instance with auto-layout?
- ...