iphone
XCTest.framework build error
I agree with Mike Weller. You should probably not be linking against the XCTest framework in your actual app code. Remove XCTest framework. Look at the linker errors and remove things that are referencing the framework. Wash, rinse, repeat. If you have a test target, that is different. What can easily happen during the migration … Read more
Can’t add a corner radius and a shadow
Yes, yes there is… If you want both a corner radius and a drop shadow, you don’t turn on -masksToBounds, but rather set the corner radius and set the bezier path of the shadow with a rounded rect. Keep the radius of the two the same: [layer setShadowOffset:CGSizeMake(0, 3)]; [layer setShadowOpacity:0.4]; [layer setShadowRadius:3.0f]; [layer setShouldRasterize:YES]; … Read more
Multi-line strings in objective-c localized strings file
Just use the new lines directly. “email” = “Hello %@, Check out %@. Sincerely, %@”;
Convert unsigned char array to NSData and back
You can just use this NSData class method + (id)dataWithBytes:(const void *)bytes length:(NSUInteger)length Something like NSUInteger size = // some size unsigned char array[size]; NSData* data = [NSData dataWithBytes:(const void *)array length:sizeof(unsigned char)*size]; You can then get the array back like this (if you know that it is the right data type) NSUInteger size = … Read more