In my Xamarin project, I have used DailogViewController.
Using this, I have set the root elements and height both.
When I run the application, it works fine and the height (35f) which I set.
But when orientation change, in debug console, I see 35f as row-height, but In View, it is bigger than 35f.
The first output is like below image which is correct,
But after orientation change, it is displaying bigger size, but in console, the value of row-height is displaying 35f.
Any help will be appreciated to resolve this discrepancy in UI.
I debug it out more, It is resetting its size to 63f.
After more debugging, I found out, if we are using "BadgeElement" class for creating cell with Image+text, then only it is happening. Any way to set static height for "BadgeElement"
Related
I have a small application which uses the Custom Title bar. In use I have no issues with it, but each time I reload the program into Delphi the title bar has grown in height covering everything else and has to be returned manually to the required height.
I saw this effect when running my code until I set the height in the resize event.
Is this normal operation or have I missed something?
I have found that setting the CustomTitleBar.SystemHeight to true resolves problem because my controls fit within the system Toolbar height.
I guess the issue remains if you want to extent the Toolbar height.
I am making a simple app since I'm quite new to xCode. I have a table view which holds cells. I've added constraints that I was hoping would dynamically change the width of the cell depending on the device (iphone vs iPad). However, it doesn't seem to be working.
I believe I've set all the necessary constraints, but I guess I must be missing some.
Here is an image of what I'm working with:
And this is the problem, when I change the size of the device I'm working on, the labels in the cell don't resize themselves.
Here are the constraints I'm currently using:
Any help would be appreciated, thanks.
Most probably you haven't updated the frames after changing the size of the view controller
I'm using ECSlidingViewController. When the app starts, it opens a scroll view which is resized dynamically, since it contains both labels and a table view. Both the table and the scroll view containing it are resized.
Everything works as intended when the view is first loaded. However, if I open and close the menu view, or if I use it to go to any view which resizes itself, the resizing does not work. Instead, it displays the scroll view as if it has the height assigned to it in the storyboard.
I'm completely lost as to why this happens, and would greatly appreciate help. I can post code as well, of course, but I don't know what code might help, since I guess that the error is on ECSlidingViewController's part.
Are you using auto layout? If so, whenever something else happens that triggers the application of the constraints, all the frames will be reset to the values dictated by those constraints. Try turning off auto layout and see if that fixes it. Refer to your auto layout settings.
Alternatively, if you want to keep auto layout, I'd generally suggest changing the frames by programmatically changing the constant values of the constraints. But, I'm not familiar with ECSlidingViewController, so I don't know if that's a reasonable option in this particular case.
I'm running into a bit of an issue with the Master-Detail layout for an iPad app I'm writing. The DetailController contains a UIViewController that manages a tableview. The tableview contains custom cells, and the layout is very specific.
I'm using auto-layout, and the hopes were to use auto-layout to manage the cell layout on transition from portrait to landscape, but that seems to be a complete bust. No matter what I do, I can't seem to get a layout configuration to work where the table is resized on rotation. The size is stuck at whatever the width and height are defined as in the Size Inspector for that table.
Sooo ... I'm trying to make it work on my own. But I can't figure out when the Display Controller actually resizes itself. No matter where I check, when I get the size of the Display Controller, the width and height are fixed at the original size for portrait mode.
I'm not sure what to do at this point. If someone has an idea for how to use auto-layout to make the table layout work automatically, that'd be killer. But I think I'd be satisfied at this point if someone could show me how to resize the table manually after rotation.
My app consists of 2 screen (main and settings) both are filled with scrollview completely. Each has one view controller and is supposed to support landscape and portrait orientations. I'm using Autosizing to achieve that and it works fairly well (all elements are where they should be, size is also correct) but I'm getting strange artifacts when the screen is rotated e.g. picker frame remains the same when the actual "drum" area inside is resized properly, text field is partially overlapped by background, landscape graph remains in place and is overlapped by portrait graph.
All are just basic elements without modifications, there are no images or anything special (graph is exception, I'm reloading it in didRotateFromInterfaceOrientation:). Any ideas why would that happen, why aren't the basic elements redrawn properly?
Figured it out myself in the end. Had to implement workaround as iOS apparently can't do it itself.
1) Artefacts after automatic view resize. Solution here was to hide the view before changing orientation, reload the graph and show it again after orientation was changed. Doesn't look perfect but much better than before.
2) Other problems were caused by the pickerview. Autoresize apparently doesn't work at all. The solution here was create UIView instead of the picker which resizes without problem and again recreate the pickerview every time the orientation changes.