I'll try to keep this short and sweet. I have a universal storyboard and my application runs perfectly on the iPhone. I'm having an issue though where I have a view controller with 2 containers, which contain separate tableviewcontrollers.
On the iPad simulator the top table view controller works fine yet the bottom will not scroll or select any cells. Again, it works perfectly on the iPhone simulator.
I cannot for the life of my figure out whats causing this. Anyone run into something similar?
Thanks
Your view might be covered by another view. To make sure your view stays in the front, you can use
[self.view bringSubviewToFront:yourView];
Related
Using views within my application is causing my storyboard to do strange things. This is making it very difficult for me to make changes. I thought the issue was due to the fact that using a view limits the size of your next view and so on.
However, it's now causing issues where I have to move tableviews into strange places to make them display correctly on the device.
These views both display correctly on my device. However the view at the top is only half the screen. There is also a navigation bar throughout the app which can no longer be seen on my storyboard.
The first view was fine until earlier today when it randomly began displaying as seen below.
Has anyone had this issue before and know how to fix it?
I am newbie in Xamarin iOS development.
I created a storyboard, added few view controllers in it.
I added some controls in one view controller, ran the code and checked the output on simulator. All worked great.
Now after some time I checked my storyboard design. Now the controls are not visible in view controller(in story board), but they are visible in document guideline(view hierarchy).
please let me know what should I do to solve this issue.
Thanks in advance.
The problem was solved by clicking on the Portrait/Landscape icon two times which changed the device width to "Compact" and height to "Regular" an in 5 seconds the controls were visible in the ViewController
To put it simply, my app has two main views: the first serves to choose some values, the second displays a report. Both are TableView based.
The app looks well on iPhone with any screen size and for any orientation, but since the app’s thought to be universal, I want to get rid of those gaps between elements when the app runs on iPad.
I decided to have the app displaying both views on iPad screen simultaneously as official YouTube app does:
(1) and (2) are the first and the second View controller.
I see it this way:
1) Some initial view controller (additional navigation view controller?) checks idiom (iPhone / iPad) and chooses the next viewController. If idiom is iPhone, the first view controller is pushed.
2) If idiom is iPad, the «new» view controller is pushed. It has two view containers containing the fist view and the second view. Containers have autolayout constraints etc.
Questions:
1) Is it a right idea in context of Apple app design philosophy? What’s the better way to create iPad view combining existing ‘iPhone’ views?
2) Where to check for device type? Shall I use the second storyboard or something? Maybe there’s a good tutorial for this case, I didn’t find one.
Thanks in advance!
For the 2nd part of your question I think you want to look into
I think you want to look into Size Classes and Auto Layout
You can make a single view but depending on the size / orientation of the device - you can enable/disable certain components of the view.
You can pin views so that in portrait you have your 1st layout and in a landscape you have your 2nd layout.
With regards to your 1st question - you do have the ability to embed a view inside of another view
I'm not sure if this is what you are looking for - but as far as what apple is pushing I believe size classes is what they "suggest". You can do a lot. The only thing is make sure you turn on the assistant editor into storyboard preview mode it will help a lot.
I have a tableview, that is working fine. I have added a view to the top, so I can add some extra fields. I can't post images yet, so going to try and describe.
Navigation Bar
View
TableView
When I build it, it looks good.. However when I run or close the project and reopen I get this:
Navigation Bar
View
TableView
With the view taking up the complete page, pushing the TableView to the very bottom.
Any thoughts on why this is happening and how to fix it?? I can resize it back to the size I want using the size inspector, but it doesn't keep the value.
I have built a test project with the same screen layout and it works perfectly. I can't see what is different between the two projects is. Thanks
Yes, this was an auto layout problem.. After looking around the web, and trying various solutions I decided to use a view controller, and add my own tableview and tablefviewcell to that, along with my other labels and buttons. Once I built the methods the first time, I found this to be much cleaner solution, than attempting to mess around with the tableviewcontroller.
I have 2 UIViewControllers in my app, and 2 views. 1st view is black, 2nd view is white.
The orientation is landscape mode, and the main (1st) view works ok.
So I created a second view controller, made the orientation in ib for it landscape, and connected the 2nd view to it via IB.
I realised that the moment I connect the view, the orientation is messed up. It seems like the app is displaying the 2nd view in potrait mode instead. But nowhere in IB are my views in potrait mode.
I should get this. (I can get it by disconnecting the 2nd view from the 2nd viewcontroller, but that's not really what I want.
But I am getting this.
This should be straightforward but it seems like it's not.
How do I fix this? I've tried putting
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight|UIInterfaceOrientationMaskLandscapeLeft;
}
in both viewControllers but it doesn't help. Any ideas?
It was the autoresize mask.
Somehow if the arrows are not selected I get the undesirable result. It's fixed but I'm not quite sure why.
I'll be glad to accept the answer for anyone who can explain this to me. :)