Questions tagged [ios-autolayout]

In iOS, Auto Layout dynamically calculates the size and position of all the views in your view hierarchy, based on constraints placed on those views.

In iOS, Auto Layout dynamically calculates the size and position of all the views in your view hierarchy, based on constraints placed on those views.

More info

1049 questions
-1
votes
1 answer

Dynamic Buttons in UIScrollView with Equal width and height

I want to display list of buttons in scrollview with dynamic height based on screen size. I can able to do this in UIView, but when I applied same auto layout approach in UIScrollView, it's not increasing the size of buttons. So please guide me How…
-1
votes
1 answer

UISegmentedControl customization/extensions

I have three doubts about using UISegmentedControl: 1. How (if possible) do we customize UISegmentedControl to work as in this image? 2. Is there a simple way to define autolayout width constraint of UISegmentedControl that expands or contracts…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-1
votes
1 answer

Right UIBarButtonItem shows a vertical line on navigationBar

I have build an application which uses the WebView.When application launch and comes to WebView controller then before WebView complete its loading the ui bar button item shows only the custom icon but when WebView complete its loading then a…
Asad Yasin
  • 93
  • 10
-1
votes
2 answers

Should I reuse tableView cells when they have little difference?

I just want to know which is the better way to do cell reuse For example: Cell 1: Name Detail Time Cell 2: Name Detail Image Time The two cells, "Name","Detail","Time" are having the same position. So, my questions are: Shall I use one cell for…
Sven Shao
  • 45
  • 4
-1
votes
1 answer

Collection view not obeying constraints in Xcode

I have a collection view that has its edges constrained to the safe area. However, the collection view fully covers the entire screen. Now if I change the contstraints remove the top constrain and change it to a fixed height constraint, the…
God Himself
  • 209
  • 1
  • 4
  • 15
-1
votes
1 answer

Custom UITableViewCell - adjust UILabel vertical alignment dynamically

I have a custom table cell. It has two labels (title and description), one below the other. What I have right now is, title label top = topMargin. And description label top = title label bottom + 10. But in some cases, there will be no description.…
SKT
  • 271
  • 4
  • 15
-1
votes
1 answer

Screens of an iPhone App have a fixed aspect ratio

I am adapting an iPad app (originally built on Objective C/Swift) for the iPhone. I have removed all things from the UI, the only things left are: Blue fill - the navigation bar Red fill - the toolbar The app appears to have the screen's aspect…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
-1
votes
1 answer

UIView autolayout constraints wrt parent

I have a custom UIView (called myView) which has many subviews. My problem is I need to place the subviews of myView depending upon placement of myView in it's parent. So if myView is on the left side of screen, I want to place some elements on the…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-1
votes
1 answer

How to create Circular Reel view in Android?

How can I create view like this in Android? I have created that circular main frame image using drawable circle shape
Abhishek
  • 1,654
  • 2
  • 18
  • 31
-1
votes
1 answer

Black dot in UITextField, instead of Placeholder text, when using Auto Layout in Xcode 9.2

After upgrading to Xcode 9.2, I have had a strange issue in Auto Layout with all the placeholders in my UITextFields. Did anyone find a solution to this problem?
YoungChul
  • 165
  • 12
-1
votes
2 answers

Make responsive label font size for iphone devices

I am new to iOS Development.I am having problem with font size with phone screen size.For example Font size in iPhone 8 Plus looks fine but that text size is bigger in iPhone SE.I tried check Dynamic Type to Automatically Adjusts Font.And try to…
John
  • 3,769
  • 4
  • 12
  • 23
-1
votes
1 answer

How set constrain with 4 button in iOS?

I have 4 button in view and want each space between each button have the same adapt to screen iPhone. Any one can help please?
sony
  • 730
  • 2
  • 9
  • 19
-1
votes
2 answers

Label alignment to top when UIImage is nil Using AutoLayout

I am trying to designing dynamic UI , I trying to move label to the top sometimes when image view image will be empty using auto layout[![enter image description here][1]][1]
Kishor
  • 376
  • 4
  • 14
-1
votes
1 answer

how do I have a tableview footer whose height auto increases

I would like to add a label to table footer which will auto increase and footer height also auto increases .How can I achieve this any ideas
Shankar Naik
  • 401
  • 5
  • 16
-1
votes
1 answer

how do I make tableviewcell height to autogrow

I have a tableviewcell with two labels and the label's height will change depending on the content so tableviewcell height will automatically change. now how can I make tableview cell height to autogrow ? Please clarify me if the tableview cell…
Shankar Naik
  • 401
  • 5
  • 16