Friday, August 26th, 2011 at
Useful Shortcut Keys:
(replace cmd with ctrl and opt with alt on Windows/Linux)
esc - back key
ctrl + f12 - toggle landscape and portrait
cmd + option + enter - full screen
f2 - menu
cmd + shift + L - Displays all available shortcuts
cmd + shift + F - formats source
cmd + shift + O - organize imports
cmd + L - go to line number
cmd + 1 - quick fix
control + space - content assist
cmd + shift + T - finds a class
cmd + T - shows hierarchy of class you’ve selected
option + shift + a - shows Android specific shortcuts
Wednesday, March 2nd, 2011 at
The layoutopt tool is a command-line utility which helps you to analyze and optimize the XML files that define your application’s UI. It also helps to find inefficiencies in the view hierarchy. This tool is included along with the SDK.
To run the tool, open a terminal or command-prompt and type layoutopt followed by the from your SDK tools/ directory. The argument is a space- delimited list of resources you want to analyze, either non-compiled resource xml files or directories of such files.
The tool loads the specified XML files and analyzes their definitions and hierarchies according to a set of predefined rules. For every issue it detects, it displays the following information:
The filename in which the issue was detected.
The line number for the issue.
A description of the issue, and for some types of issues it also suggest resolutions.
See some sample optimization testing screen shots below:
Monday, September 20th, 2010 at
Implement loadView to create a view hierarchy programmatically, without using a nib.
self.view = [[UIView alloc] init];
self.view.backgroundColor = [UIColor clearColor];
self.view.frame = CGRectMake(0, 0, 768, 1024); //For ipad…
self.view.frame = CGRectMake(0, 0, 320, 480); //For iphone...
//.…..also for adding button,imageView,label,textView etc…
we should give the frame as given below…..
bgImgView = [[UIImageView alloc] init];
bgImg = [UIImage imageNamed:@"someImage.png"];
bgImgView.image = bgImg;
bgImgView.frame = CGRectMake(CGFloat x, CGFloat y, CGFloat
width, CGFloat height) ;