Being a start-up developer of Objective-C and not having the patience to actually do some research, rather than just diving into things, I came across the following:
I have a CGFloat and I want to share it with something and use the result as an NSInteger.
Example:
CGPoint p = scrollView.contentOffset;
NSInteger * myIndex = p.x/468.0;
During compilation, I get an error: "Incompatible types during initialization." I assume that due to a mismatch between CGFloat and NSInteger.
What should I know to get rid of this? Excuse for troubling.
Sjakelien
source
share