The layout you can see below is a UIViewController
having four buttons with same size aligned horizontally and a UIPageViewController
below them. The UIPageViewController
holds 4 pages. Each page contains a UITableView
.
The four buttons is embedded in a UIView in which the constraints I set is:
The constraints of the buttons inside are like:
The problem is, sometimes when this view controller transitions to another view controller, the app will crash. The error would be "Cannot find an outgoing row head for incoming head". When I check the memory address of which control produced the crash, it was always the first button which has a title "Live Radio".
The problem would be solved if I set the height of the container view(view that embeds the four buttons) to a fixed value, not aspect ratio. However, I want the size of the tabs to expand with respect to the size of the screen. So, this won't be a good solution for me.
Is there any other way to make the four buttons expand proportionally with the screen without using aspect ratio?
Thanks!
-------- EDIT ---------
Regarding how I transition to another view controller, it's just plain
[self performSegueWithIdentifer:@"showArtistDetailsView"];
I got this problem fixed by interchanging the width and height of the aspect ratio constraint of the "Live Radio" button.