for devices without retina:
ImageName.png - For iPhone/iPod
ImageName~ipad.png -- For iPad
For devices with retina display:
ImageName@2x.png - For iPhone/iPod
ImageName@2x~ipad.png -- For iPad
for devices without retina:
ImageName.png - For iPhone/iPod
ImageName~ipad.png -- For iPad
For devices with retina display:
ImageName@2x.png - For iPhone/iPod
ImageName@2x~ipad.png -- For iPad
best approach is the old-fashioned way. Create images for each size with names like test-667 and do something like:
[UIImage imageNamed:[NSString stringWithFormat:@"test-%g", [[UIScreen mainScreen] bounds].size.height]]
UIViewController's method invoke sequence is as below
([\d]+), \1((?:\W|$))
^ : Start anchor
( : Start of capturing group
\w+ : A word
) : End of capturing group
\s+ : One or more whitespace
\1 : Back reference to the first word
\b : Word boundary
| // Create a sample URL. | |
| NSURL *url = [NSURL URLWithString:@"http://www.bbc.co.uk/tv/programmes/genres/drama/scifiandfantasy/schedules/upcoming.json"]; | |
| // Create a download task. | |
| NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithURL:url | |
| completionHandler:^(NSData *data, | |
| NSURLResponse *response, | |
| NSError *error) | |
| { | |
| if (!error) |
| // Logging Macros | |
| #ifdef DEBUG | |
| # define DLog(FORMAT, ...) printf("%s %s ~ %s\n", [[[NSDate date] description] UTF8String], __PRETTY_FUNCTION__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]) | |
| #else | |
| # define DLog(...) | |
| #endif | |
| // ALog always displays output regardless of the DEBUG setting | |
| #define ALog(FORMAT, ...) printf("%s %s ~ %s\n", [[[NSDate date] description] UTF8String], __PRETTY_FUNCTION__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]) |
The corrent order of arguments
g++ -o test test.cpp pkg-config --cflags --libs opencv
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib