ios-autolayout Questions

2

Solved

On the storyboard, inside a view controller I have a scrollview. A navigation bar and a stack view are embedded inside the scrollview. Programmatically I am adding some UI elements one below the ot...
Mady asked 18/1, 2019 at 6:13

2

Solved

Numerous tutorials on animating AutoLayout constraints suggest to update constant property of a constraint and then call layoutIfNeeded() in animation block. My situation is a bit tricky. I have a...
Shilashilha asked 17/9, 2018 at 13:32

3

Solved

I have an IBOutlet NSLayoutConstraint in my app. Very simple: @property (nonatomic, weak) IBOutlet NSLayoutConstraint* leftConstraint; At some point I want to deactivate this constraint: self.l...
Subsidy asked 27/6, 2016 at 10:42

2

First let me tell that I have gone through multiple same kind of questions available in Stack Overflow but neither of them helped me. So I created new question for discussing my problem. I am beg...
Orgel asked 2/4, 2018 at 18:24

0

i tried to implement rotation adjustments so in tutorial author was using invalidatelayout function before setting new preferences. but all actually works without invalidateLayout, and yet i tried ...
Antihelix asked 14/3, 2018 at 14:18

1

Solved

I noticed an Xcode warning that said : "Language directional layout margins before iOS 11.0" Even this question left unanswered in Apple developer forum thead. I have used storyboard & wa...
Bozarth asked 30/11, 2017 at 11:58

3

I've a known issue with adding a UIButton into UIBarButtonItem. I've tried to add auto layout constraints as suggested in stackoveflow but I'm getting an error described as below. UIButton *sortBu...
Afb asked 23/11, 2017 at 22:9

1

Up to iOS 10, an UIToolbar with flexible space bar buttom items between its items would automatically reduce the font so that all text get displayed on the screen. Sample below (iOS 10): Ever si...
Albumin asked 25/10, 2017 at 17:52

8

Solved

I'm a new developer iOS. I use auto-layout. I have a problem. I can not get real size of UIView after constraints. Example, when I want get size of UIView with constraint self.container.frame.s...
Dulse asked 26/12, 2014 at 5:45

2

Solved

I have a parent view whose height has to be decided by its child content. How may I achieve this in storyboard without programatically changing it.

1

I am trying to add a UIView with "Done" button as an input accessory view to the text field. let view = UIView() let doneButton = UIButton(type: .Custom) doneButton.setTitle("Done", forState: ....
Widescreen asked 10/4, 2016 at 16:45

2

It appears that the Autoresizing of views is no longer reliably working when building for iOS11 with XCode 9. The layout of several views end up with the positioning of controls as they are in the...
Coenocyte asked 18/9, 2017 at 14:31

4

Solved

Is there a way to divide the screen by percentage (not equal percentage) I need to split the screen to two parts 1/3 and 2/3. I know how to split to equal parts but cant figure out how to split to ...
Otherwise asked 7/7, 2015 at 6:45

1

Solved

This error is logged to the console when some part of the code is changing UI items from other threads than the main thread. But how can I find where it does this?
Gizzard asked 15/8, 2017 at 8:26

1

Solved

I am loading a view with buttons from a xib file. The button (green) has localized variable text. I need the UIButton to be resized dynamically with the text and then the container view (red) sho...
Bear asked 7/8, 2017 at 13:41

5

Solved

Hi I'm trying to resize the cell via the auto layout. I want display the cell by the 3 by 3. First Cell's margin left=0 Last Cell's margin right=0 And all of the cell's space has 1pt. Like an i...

3

Solved

I am trying to add constraints to a UI label I added on a navigation bar. The UI label shows a running timer Here is my code, self.label = [[UILabel alloc] initWithFrame:CGRectMake(550, 15, 150, ...
Giannagianni asked 24/2, 2015 at 23:2

1

I have a label which I want to have the same relative position on the screen, no matter what device is used. E.g. the label is positioned 10% off from the views top margin and 30% off from the view...
Hyperploid asked 6/9, 2016 at 12:23

3

Solved

I am using AutoLayout and Size classes, but with release of iOS 10 and new Xcode 8.0, there is one new option Vary for Traits. Is this replacement of Size Classe for different width and height of d...
Maggi asked 6/10, 2016 at 7:29

1

UPDATE I know what is causing this strange breaking of layout. It is the setting of an Accessory (UITableViewCellAccessory). If I stop specifying an accessory the layout does not break. I have not...
Hollow asked 13/9, 2016 at 9:11

3

Solved

is there any way to changing/auto resizing the font size according to the different iPhone screen as when i change the font size, the font size applied to other phone size as well which is too big....
Pursy asked 16/9, 2016 at 3:49

2

I have a layout with size class width any, height any which is currently working for iPad landscape. I have a task to design same layout for iPhone portrait. When I started designing with size cla...
Slinky asked 23/8, 2016 at 14:38

1

My application supports all devices from 4 inch onwards in both orientations. iPhone - 5, 5S, 5C, 6, 6S, 6+, 6S+, SE iPad 4, iPad Air, iPad Air2, iPad Pro etc Using asset catalog for launch scre...
Psoriasis asked 6/9, 2016 at 12:28

2

Solved

This question is strictly about iOS9+ Say you have an ordinary modern app (autolayout, storyboard, universal) which does allow all four rotation positions you want it to autorotate in the norma...
Lodge asked 14/7, 2016 at 18:4

4

Solved

The iOS 9.0 comes with UIStackView which makes it easier to layout views according to their content size. For example, to place 3 buttons in a row in accordance with their content width you can sim...
Sword asked 17/10, 2015 at 11:44

© 2022 - 2024 — McMap. All rights reserved.