iOS Development journal -16 Xcode6 shortcut keys, tips and xib fillet settings

Source: Internet
Author: User

The following are some of the records that use Xcode6, are miscellaneous, are constantly updated on a regular basis ...

Shortcut keys:

1. Storyboard Skills

When you want to select the element you want directly in the view, but it is difficult to directly select the elements superimposed on a view, then when you hold down the shift and control keys on the keyboard and then click on the element you want to select, a window pops up. The above lists all the elements that exist under the position of the mouse click, and then you go on to make a selection that will change the simplicity of the exception.

2. Quickly switch to the current file in the file tree vision

In Xcode often encounter a lot of situations, sometimes if you jump to a M file, and then want to switch to the left of the file directory selected file is currently open file, you can use the CMD + Shift + J to operate

Common shortcut keys:

Ctrl+shift+q hide and show debug zones

Cmd+shift+c Display Console

Tips:

1. Add a third-party font

The previous addition of third-party fonts in Xcode needs to be done as described in this article, though simple but somewhat cumbersome. In Xcode6, it's easy to add font TTF files to your project just like normal files, and you can use the new fonts directly in Xib or storyboard.

Reference: Custom fonts in Interface Builder

2. Delete a AutoLayout constraint for a control

Controls that are laid out in storyboard or xib if you have more than one AutoLayout constraint, and you want to delete one, it doesn't seem easy, but it's simple, click on the control, select the constraint you want to delete in the constraint list in the right column, double-click, Then press the BACKSPACE key to delete the constraint.

3. Add a border or fillet to the UIView in Xib or storyboard

First look at the picture:

The corner radius and border width of the view can be set, but the color of the border is not set by default.

Link http://stackoverflow.com/a/17993890 A category code to increase the color of the set border

?
1234567891011121314151617181920 CALayer+XibConfiguration.h:#import <QuartzCore/QuartzCore.h>#import <UIKit/UIKit.h>@interface CALayer(XibConfiguration)// This assigns a CGColor to borderColor.@property(nonatomic, assign) UIColor* borderUIColor;@end CALayer+XibConfiguration.m:#import "CALayer+XibConfiguration.h"@implementation CALayer(XibConfiguration)-(void)setBorderUIColor:(UIColor*)color{    self.borderColor = color.CGColor;}-(UIColor*)borderUIColor{    return [UIColor colorWithCGColor:self.borderColor];}@end

Then you can set the border color by clicking on the chart:

Proven to be successful.

There is another alternative, see here, but with the swift code.

You can also use the Layer.cornerradius to implement a circular view, set the Layer.cornerradius to half the width of a square view, and it can be displayed as a circle. After testing, you also need to set Layer.maskstobounds to Yes, no, just test it. Set Layer.shouldrasterize to Yes is OK. Reference here.

iOS Development journal -16 Xcode6 shortcut keys, tips and xib fillet settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.