There are methods to transfer a CGPoint from one UIView to another and from one CALayer to another. I cannot find a way to change a CGPoint from a UIView's coordinate system to a CALayer's coordinate system. Does a layer and it's host view have the s
I would like to be able to convert an objective-c object, such as an NSArray or UIImage into an NSData object, which I can then use to write to disk. I first converted them to an NSValue, which I then planned on converting to NSData. This question pr
I am trying to create a re-sizable array of CGPoints in objective-c. I've have looked into using NSMutableArray however it doesnt seem to allow resizing. Is there something else I can use? thank youUse an NSMutableArray, but just box your CGPoint str
This question already has an answer here: How to convert CGPoint in NSValue in swift? 4 answers So I am trying to store some info in my NSDictionary and I need to store a CGPoint value. I am trying something like this: var dict = ["name" : "
What is the appropriate way to call a method with an action, and what should the method itself look like for passing a CGPoint parameter? I've tried to look up examples online without much luck, so I've been pretty much guessing. What I have tried is
I have what should be a fairly simple question here. Basically I'm trying to move an object (a UIImageView) from a point A (where it is set in the storyboard) to a point B which I define programatically. My first pass through this resulted in this co
I am working with unod redo operations on CgLayer, I have tried some code, but not able to get it working, dont know , where I am getting wrong, below is my code, which i have written this is my drawRect function - (void)drawRect:(CGRect)rect { m_bac
I have been trying to create an array stating the location of a UIImageView in an app I've been working on. What I am trying to do is by using an array I can store the location of my "player" image by using its x,y and z coordinates. The script
I have an iOS app where I need to interfere with a map. After searching a bit I came to the conclusion that I have to use an MKMapView object and probably implement the MKMapViewDelegate protocol. I am now wondering how I can capture the touch point
I've this kind of instruction: [self someMethod:CGPointMake(50, 50)]; [self someMethod:CGPointMake(270, 50)]; [self someMethod:CGPointMake(50, 360)]; [self someMethod:CGPointMake(270, 360)]; ... I want to refactor code using NSArray like this: NSArra
I am implementing queued flood fill algorithm and need to store and retrieve pairs of numbers in NSMutableArray. Basically, I am creating an array m_queue = [NSMutableArray array]; then at some time I populate the array [m_queue addObject:[NSValue va
We can have an NSMutableArray object, and add objects to it. But CGPoint is not an object... are there Point objects suitable to be added to an NSMutableArray object? I see some code using NSStringFromCGPoint to create an NSString object so that it c
I am writing an iPhone/iPod app that uses core plot. I want the user to scroll the graph and show the actual value (which I store an array) for that particular point on the graph. I have figured out how to place a static line over the graph but have
I have this code working on swift 2, it's serve to getting row of UITableView cell on button press: @IBAction func commentsButtonAction(sender: AnyObject) { let btnPos: CGPoint = sender.convert(point:CGPoint.zero, toView: self.tableView) let indexPat