Showing posts with label iphone_sdk. Show all posts
Showing posts with label iphone_sdk. Show all posts

Sunday, October 25, 2009

Objective C for a Java Programmer

Been intending to write this for some time now. Here is a short list of things to watch out for when starting with Objective C for iPhone. The list is targeted at Java programmers beginning Objective C. Its written on my work blog.

Read Post

Saturday, February 07, 2009

Programmatically Taking a Screenshot in iPhone

It took me some time to find the code for this. Thought I'd share it here. The following code takes a screen capture of the currently visible portions of a UITableView but its applicable to any view.

UIGraphicsBeginImageContext(self.tableView.bounds.size);
[self.tableView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
//UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
UIGraphicsEndImageContext();

The commented out line saves the photo to a the Photos application on the iPhone.

iPhone not connecting to macOS from Xcode

 After trying everything standard (re-pair, restart, reconnects), it turned out that VPN was enabled on my Mac.  Turn Off VPN to let Xcode f...