if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
// here you go with iOS 7
}
ModalViewController transparent background
[viewController setModalPresentationStyle:UIModalPresentationOverCurrentContext];
Labels:
iphone SDK,
present,
transparant,
transparent
Check if the entered text uses only English letters
NSCharacterSet* tSet = [NSCharacterSet characterSetWithCharactersInString:
@"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"];
NSCharacterSet* invSet = [tSet invertedSet];
NSString* legalS = @"abcdA1";
NSString* illegalS = @"asvéq1";
if ([legalS rangeOfCharacterFromSet:invSet].location != NSNotFound)
NSLog(legalS); // not printed
if ([illegalS rangeOfCharacterFromSet:invSet].location != NSNotFound)
NSLog(illegalS); // printed
@"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"];
NSCharacterSet* invSet = [tSet invertedSet];
NSString* legalS = @"abcdA1";
NSString* illegalS = @"asvéq1";
if ([legalS rangeOfCharacterFromSet:invSet].location != NSNotFound)
NSLog(legalS); // not printed
if ([illegalS rangeOfCharacterFromSet:invSet].location != NSNotFound)
NSLog(illegalS); // printed
Labels:
compare,
iphone SDK,
search,
string
Subscribe to:
Posts (Atom)