Showing posts with label iPad. Show all posts
Showing posts with label iPad. Show all posts

Friday, May 10, 2013

Get substring from an NSString in Objective-C

In Objective-C / Cocoa to grab a substring from an NSString based on beginning and ending characters is easy. This is helpful if you want to parse HTML, JSON, or a REST statement returning. See below:


 NSString *sStr = [NSString stringWithFormat:@"%@", assetGroups[indexPath.row]];
 NSString *name= [[[[sStr componentsSeparatedByString:@"Beginning Char(s)"] objectAtIndex:1] componentsSeparatedByString:@"End Char(s)"] objectAtIndex:0]; 
 NSString *newString = [NSString stringWithFormat:@"%@", name];

Monday, January 24, 2011

Adding Icon to iPod Touch or iPhone or iPad.

To add an icon to any one of these apple devices' website, you simply add a file on the root with a png.  Make sure the dimensions are 45x45.  Then you add the following code in XHTML to your header on your page. The dimensions are higher for the iPad.

<link rel="apple-touch-icon" href="whatyounamedyourPNG.png"/>

Generating "Always On Top" NSWindow in macOS across all detected displays

Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift  Langues, you m...