cgrectmake Questions

4

I'm trying to create multiple views for an iPad app. First I created a menu view and then a sub-menu view with coordinates according to menu. So it looks like this: What I did: self.view = [[UI...
Encroachment asked 12/8, 2013 at 14:27

4

Solved

I am trying to check if a CGRect is null in my property getter and if it is, load a value by default, however, in my init method, when I use the property, it returns zero for all values. Here is m...
Electrolyte asked 18/4, 2013 at 16:48

9

Solved

This question was originally asked for the objective-c programming language. At the time of writing, swift didn't even exist yet. Question Is it possible to change only one property of a CGRect ? F...
Brade asked 2/3, 2012 at 17:19

4

Solved

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.buttonWith...
Headspring asked 15/9, 2014 at 18:16

1

Solved

I'm using a UIProgressView and want to stick a image subview to the progress % as in the image below: I want to get the co-ordinate of the progress tint and red subview as in the figure to "stic...
Aldarcy asked 17/12, 2016 at 10:39

3

Solved

Now that CGRectMake , CGPointMake, CGSizeMake, etc. has been removed in Swift 3.0, is there any way to automatically update all initializations like from CGRectMake(0,0,w,h) to CGRect(x:0,y:0,width...
Sisterinlaw asked 12/7, 2016 at 17:3

4

Solved

I need to create a frame for a UIImageView from a varying collection of CGSize and CGPoint, both values will always be different depending on user's choices. So how can I make a CGRect form a CGPoi...
Pape asked 21/8, 2012 at 21:57

9

Solved

I have a UITableView with about 400 cells in 200 sections and it's a little sluggish in responding to user interaction (scrolling, selecting cells.) I've made sure the methods for retrieving cells ...
Halfmast asked 30/5, 2011 at 4:0

1

Both seem to work the same in Swift. Which should we use? CGRectZero vs CGRect.zeroRect GRectMake(1, 1, 1, 1) vs CGRect(x: 1, y: 1, width: 1, height: 1) UIEdgeInsetsMake(1, 1, 1, 1) vs UIEdgeInse...
Collative asked 2/5, 2015 at 3:4

1

Solved

I have this code inside an animation: image.frame = CGRectMake(x: x, y: y, width, height) I need to get the x and y coordinates of an image. I found this Objective-C code: CGPoint origin = imag...
Certainly asked 18/1, 2015 at 10:41

3

Solved

I'm making a picture in a frame and then user can resize the frame size in runtime. For this purpose I've made a custom UIView in my main UIViewController and inside this UIView I've placed 2 UIIma...
Scintillator asked 22/12, 2014 at 8:47

0

I have a UIwebview that I want to fill the screen between the navigation bar at the top and the tab bar at the bottom. My web view is being defined programmatically and I was initializing it with a...
Snowcap asked 6/11, 2014 at 6:36

5

I have a UIImage that I want to show pixel-for-pixel on an iPhone 4/4S/5 screen. It's important that it is not scaled at all, but when I try using setImage, it makes the image too large. My UIImag...
Vernation asked 28/5, 2013 at 2:31

3

Solved

I have seen this alternative to using CGRectMake() in order to initialise a CGRect variable: CGRect frame = (CGRect){0,0,10,10}; My question is, how does CGRect frame = (CGRect){0,0,10,10}; w...
Ingold asked 7/8, 2012 at 8:45

2

Solved

This is a very simple question of which i can't seem to find the answer. How to do this : CGRectMake(1, 3, size) or CGRectMake(pointB, size) or CGRectMake(pointB, size.width, size.heigh...
Teliospore asked 28/1, 2013 at 14:1
1

© 2022 - 2024 — McMap. All rights reserved.