I have a class as :
and then class B as :
So, why would line 1 of 'someMethod' not work and line 2 work but with some absurd value.
Or, what would be the way to convert CGFloat to uint ?
Code:
@interface A
{
@private
CGFloat someVar;
}
@property (nonatomic,readonly) CGFloat someVar;
@end
Code:
@implementation A
@synthesize someVar;
@end
and then class B as :
Code:
@interface B
{
@private
uint someVar_In_B;
}
@end
Code:
@implementation B
-(void)someMethod
{
// assuming someVar in 'A' is initialised to proper value say '20.0'
CGFloat value=[pointer_to_A someVar]; // compile error --> Incompatible types in initialisation
someVar_In_B=[pointer_to_A someVar]; // works but some absurd value
}
@end
So, why would line 1 of 'someMethod' not work and line 2 work but with some absurd value.
Or, what would be the way to convert CGFloat to uint ?