Skip to main content

Questions tagged [cgrectmake]

CGRectMake is used in iOS, it returns a rectangle with the specified coordinate and size values.

cgrectmake
0 votes
0 answers
39 views

Objective-C initializers used by Swift (or not)

In an app that was originally created in Objective-C but now with a lot of Swift code, initializing a CGRect, for example, using CGRectMake compiles just fine on a developer's Mac using Xcode, but ...
Victor Engel's user avatar
  • 2,103
0 votes
0 answers
17 views

how to access the Origin XY and size Width Heigh of a container ScrollView given their Children UIViews

I the storybook, there is a main UIViewController of type ScrollView, it includes several UIViews. In the code I have an NSArray that contains all the UIViews that are withinvthe scrollView. for some ...
Amrmsmb's user avatar
0 votes
1 answer
920 views

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'

The problem started with the XCode 10.2.x as I guess While it was working fine with the XCode 10.1 The crash point is "pdfView.frame = self.view.frame" from below code: import UIKit import PDFKit ...
Ashvin's user avatar
  • 8,777
0 votes
1 answer
1k views

Effect of change of frame of View on Subviews

I should know this but don't and can't find it explained anywhere. I am moving a UIView in the coordinate space of the window and would like its subview (a tableView) added in code to move as well. ...
user1904273's user avatar
  • 4,674
1 vote
0 answers
347 views

change PageControl height from UIPageViewControllerDataSource

I have a PageViewController set up and everything is working as it should. Currently I'm working on the GUI appearances, and running into some problems with the Page Indicator (UIPageControl). I have ...
Paul Heuts's user avatar
1 vote
1 answer
1k views

UIImageView won't change size

I am trying to alter the width and height of an UIImageView object but for some reason I can't. This is the code I used: -(void)setMenuImages { self.menuImageButton.image=[UIImage ...
Student's user avatar
  • 418
1 vote
2 answers
6k views

iOS Swift Scrollview Set Frame Position Programmatically

I am have scrollview in my app. By default y position of my scrollview is 80. In some locations I need to move y position of my scrollview to 0. Here is the code @IBOutlet weak var ScrollView: ...
Kavin Kumar Arumugam's user avatar
1 vote
1 answer
722 views

How to get the exact point of objects in swift?

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 "stick" ...
Aashish's user avatar
  • 2,662
0 votes
1 answer
170 views

Cant resize a UIButton with CGRectMake

I have a button with a image on it, I am using UIView.animateWithDuration to assign a new size to the view as well as the image view. The view scales up correctly, but there is no change to the ...
Supratik Majumdar's user avatar
0 votes
3 answers
237 views

How can I place a UILabel below an UIImageView such that it is always evenly placed

I have made a custom pop view which looks like this I want to place the label of user name below the user image which is the rounded UIImageView in the given image I want the user name to be placed ...
Avinash Sharma's user avatar
1 vote
1 answer
161 views

tableHeaderView doesn't properly resize

I am using a UITableView with a custom tableHeaderView In my viewDidLayoutSubviews I am using properly working code like this: let bounds = UIScreen.mainScreen().bounds imageSliderVC.view....
JVS's user avatar
  • 2,642
0 votes
1 answer
329 views

Scroll View and Tableview programmatically alignment

I am implementing a UIScrollView which holds some user data. I am downloading additional data from my server. Once downloaded the contentSize of my UIScrollView should be the original size + the ...
JVS's user avatar
  • 2,642
1 vote
2 answers
1k views

Changing UISlider x and y position

I have viewController with slider inside and I need to change the position of slider programmatically. I am using following code: mySliderOutlet.frame = CGRectMake(100, 250, mySliderOutlet.frame....
otter's user avatar
  • 93
54 votes
3 answers
83k views

Update CGRectMake to CGRect in Swift 3 Automatically

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:w,...
yonasstephen's user avatar
  • 2,695
0 votes
1 answer
216 views

Swift: Finding size of element programatically on different devices

For my job I am helping to design an iOS app and so I recently started working with Swift. In the app we have three different elements: a Google maps element and two graphs. I want to make it so that ...
tdolphay's user avatar

15 30 50 per page
1
2 3 4 5
11