Forum Archive

Custom width for view not honored

robinsiebler112

I created a View in the UI Editor and I set the width to 650. However, when I run the app, the view is not that wide and the text in my textview is clipped. I tried manually setting the width, but it is still not working. I'm doing this on an iPad.

robinsiebler112

This should have been in questions. Sorry.

Dann239

Post your code?

robinsiebler112

In the form (UI Editor), under Size, I have this set:

FRAME
Width: 600
Height: 575

where I load the form, I have

main_view = ui.load_view('menu')

#main_view.width = 600 # this line did not work

main_view.present("sheet")
dgelessus

Sheets have a static size AFAIK, they'll always be 540 by 575 px. Popovers are the only thing with fully variable size, sidebars have a variable width up to 200px, and everything else is static or dependant on screen size.

(btw, you can move a thread to a different section by editing the first post.)

ccc

Do you get the desired result if you:

main_view.present('full-screen')
robinsiebler112

It covers the full screen, so my text isn't clipped, but that doesn't solve the problem with the sheet not honoring the width I set.

omz

Yes, sheets have a fixed size on iOS 7 (it looks like this will change with iOS 8).