You need to use view’s layer to set border property. e.g:
#import <QuartzCore/QuartzCore.h>
...
view.layer.borderColor = [UIColor redColor].CGColor;
view.layer.borderWidth = 3.0f;
You also need to link with QuartzCore.framework to access this functionality.
More Related Contents:
- Should IBOutlets be strong or weak under ARC?
- Proper way to exit iPhone application?
- Programmatically retrieve memory usage on iPhone
- How to customize the background/border colors of a grouped table view cell?
- Remove HTML Tags from an NSString on the iPhone
- How to load a UIView using a nib file created with Interface Builder
- Measuring cellular signal strength
- Zooming MKMapView to fit annotation pins?
- How to load local html file into UIWebView
- UIButton inside a view that has a UITapGestureRecognizer
- Getting a list of files in a directory with a glob
- How to use Auto Layout to move other views when a view is hidden?
- How do I make UILabel display outlined text?
- Passing parameters to addTarget:action:forControlEvents
- How do I scroll the UIScrollView when the keyboard appears?
- What’s the best way to find the user’s Documents directory on an iPhone?
- How can I click a button behind a transparent UIView?
- How to read data structure from .plist file into NSArray
- Detecting whether or not device support phone calls?
- Is it possible to disable floating headers in UITableView with UITableViewStylePlain?
- Positioning MKMapView to show multiple annotations at once
- How to detect iphone is on silent mode
- Loading a Reusable UITableViewCell from a Nib
- How to specify size for iPhone 6/7 customised edge-to-edge image?
- How can I delay a method call for 1 second?
- AVAudioPlayer throws breakpoint in debug mode
- Styling the cancel button in a UISearchBar
- Rounded Corners on UIImage
- Design UITableView’s section header in Interface Builder
- Setting an image for a UIButton in code