All Questions

51
votes
3answers
6639 views

How to initialize properties that depend on each other

I want a picture to move to the bottom. If I press a button the pic should move down by 1. I added the picture and a button: var corX = 0 var corY = 0 var runter: UIButton = UIButton.buttonWithTyp...
49
votes
2answers
46949 views

Switch between two frames in tkinter

I have built my first few scripts with a nice little GUI on them, as the tutorials have shown me, but none of them address what to do for a more complex program. If you have something with a 'start ...
294
votes
7answers
192490 views

UIView frame, bounds and center

I would like to know how to use these properties in the right manner. As I understand, frame can be used from the container of the view I am creating. It sets the view position relative to the contai...
27
votes
4answers
57039 views

Python Tkinter scrollbar for frame

My objective is to add a vertical scroll bar to a frame which has several labels in it. The scroll bar should automatically enabled as soon as the labels inside the frame exceed the height of the fram...
30
votes
2answers
16773 views

Why am I having to manually set my view's frame in viewDidLoad?

I have a pretty basic setup with a UINavigationController inside a UITabBarController. I'm wanting to programmatically layout the view of the rootViewController of that navcontroller, but when I look ...
1
votes
3answers
1325 views

the images are not loading

The frame window is launching but the background and the foreground images are not loading and the window frame size is also very very small. Please help me to fix the error. here is the code posted ...
60
votes
5answers
45550 views

Can I use setFrame and autolayout on the same view?

I want to add padding to all of my buttons, so I subclassed UIButton, and among other changes, I wanted to add a fixed padding by using setFrame method. Everything was working, except for setFrame. I...
76
votes
11answers
95969 views

Adjust UILabel height to text

I have some labels which I want to adjust their height to the text, this is the code I wrote for this now func heightForView(text:String, font:UIFont, width:CGFloat) -> CGFloat{ let label:UILa...
191
votes
3answers
102177 views

UIView's frame, bounds, center, origin, when to use what?

UIView has the properties frame, bounds, center, and origin, and they all seem to be interrelated. Most of the time, I deal with frame when setting the position and size of a UIView. I understand th...
67
votes
3answers
86948 views

Html code as IFRAME source rather than a URL

This standard code for an IFRAME, is there a way to replace the src URL with Just html code? so my problem is simple, I have a page it loads an HTML body from MYSQL I want to present that code in a fr...

Previous Next