How to set iPhone UI View z index?

UIView siblings are stacked in the order in which they are added to their superview. The UIViewhierarchy methods and properties are there to manage view order. In UIView.h:

@property(nonatomic,readonly)UIView*superview;
@property(nonatomic,readonly,copy)NSArray*subviews;
-(void)removeFromSuperview;
-(void)insertSubview:(UIView*)view atIndex:(NSInteger)index;
-(void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2;
-(void)addSubview:(UIView*)view;
-(void)insertSubview:(UIView*)view belowSubview:(UIView*)siblingSubview;
-(void)insertSubview:(UIView*)view aboveSubview:(UIView*)siblingSubview;
-(void)bringSubviewToFront:(UIView*)view;
-(void)sendSubviewToBack:(UIView*)view;

The sibling views are ordered back to front in the subviews array. So the topmost view will be:

[parentView.subviews lastObject];

and bottom view will be:

[parentView.subviews objectAtIndex:0];

Like Kolin Krewinkel said, [parentView bringSubviewToFront:view] will bring the view to the top, but this is only the case if the views are all siblings in the hierarchy.

http://stackoverflow.com/questions/4631878/how-to-set-iphone-ui-view-z-index

Show hidden files Mac OS X 10.7 Lion and 10.8 Mountain Lion

To enable hidden files/folders in finder windows:

  1. Open Finder
  2. Open the Utilities folder
  3. Open a terminal window
  4. Copy and paste the following line in:
    defaults write com.apple.Finder AppleShowAllFiles YES
  5. Press return
  6. Now hold ‘alt’ on the keyboard and right click on the Finder icon (ON DOCK)
  7. Click on Relaunch
You should find you will now be able to see any hidden files or folders. One you are done, perform the steps above however, replace the terminal command in step 4 with:
 
defaults write com.apple.Finder AppleShowAllFiles NO