Questions tagged [frame]

Frame refers to a property of a UIView or an NSView in Objective-C. It is a 4-floating-point representation of the View's location in the parent view or window. ... Use the [frames] tag for HTML frames (not iframes).

Frame refers to a property of a UIView or an NSView in Objective-C. It is a 4-floating-point representation of the View's location in the parent view or window.

This tag does NOT refer to HTML <frame> or <iframe> tags.

Do not confuse this tag with either.

3698 questions
327
votes
6 answers

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 container view. It also sets the size of that view. Also…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
196
votes
3 answers

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 that frame is using global coordinate system and…
Boon
  • 40,656
  • 60
  • 209
  • 315
187
votes
5 answers

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 frame so it renders it self independent of the rest…
Max
  • 4,152
  • 4
  • 36
  • 52
131
votes
18 answers

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:UILabel = UILabel(frame: CGRectMake(0, 0, width,…
TheBurgerShot
  • 1,586
  • 2
  • 11
  • 20
129
votes
2 answers

How does clipsToBounds work?

I would like to know how to use the UIView property clipsToBounds. The official documentation says the following: clipsToBounds property A Boolean value that determines whether subviews are confined to the bounds of the view. Discussion Setting…
Toshi
  • 6,012
  • 8
  • 35
  • 58
128
votes
4 answers

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 menu', for your opening screen, and upon user…
Max Tilley
  • 1,509
  • 3
  • 10
  • 9
113
votes
7 answers

What's the difference between IFrame and Frame?

Looking at options for embedding the 3D Secure page inside my own order form, I came across the following: "Some commerce sites will devote the full browser page to the authentication rather than using a frame (not necessarily an iFrame, which is a…
Duncan
  • 10,218
  • 14
  • 64
  • 96
111
votes
5 answers

How to know total number of Frame in a file with cv2 in python

How to know total number of Frame in a file ( .avi) through Python using open cv module. If possible what all the information (resolution, fps,duration,etc) we can get of a video file through this.
Niraj
  • 1,151
  • 2
  • 8
  • 9
92
votes
8 answers

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 frame. After searching through, I found this useful…
Chris Aung
  • 9,152
  • 33
  • 82
  • 127
89
votes
9 answers

How to prevent my site page to be loaded via 3rd party site frame of iFrame

How can I find out that my page is embedded as a frame to other site during page loading? I guess referrer request header can't help me here? Thanks.
Andriy Kopachevskyy
  • 7,276
  • 10
  • 47
  • 56
85
votes
3 answers

What is the mask in a WebSocket frame?

I am working on a websocket implementation and do not know what the sense of a mask is in a frame. Could somebody explain me what it does and why it is recommend? 0 1 2 3 0 1 2 3 4 5 6 7 8 9…
bodokaiser
  • 15,122
  • 22
  • 97
  • 140
79
votes
4 answers

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.buttonWithType(UIButtonType.System) as UIButton var image =…
Lukas Köhl
  • 1,569
  • 2
  • 15
  • 28
73
votes
13 answers

Simple way to change the position of UIView?

I change the position of a UIView with following codes without changing size of the view. CGRect f = aView.frame; f.origin.x = 100; // new x f.origin.y = 200; // new y aView.frame = f; Is there more simple way to change only the view position?
Seunghoon
  • 5,632
  • 5
  • 35
  • 41
71
votes
5 answers

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 checked around, and I found out that if I…
SirRupertIII
  • 12,324
  • 20
  • 72
  • 121
70
votes
2 answers

What is the height of Navigation Bar in iOS 7?

I 've just created a simple iOS 7 app using the default Master Details template. In the MasterViewController.m, viewDidAppear method, I logged…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
1
2 3
99 100