iOS Development Basics-Fragmentation 31

Source: Internet
Author: User

1:uitableviewcell Drawinrect failed in iOS7

Workaround, move the layout of the cell into the new view, implement the Drawinrect in the view, and load the view inside the cell with the following code:

@implementation customtableviewcell-(ID) Initwithstyle: (Uitableviewcellstyle) style Reuseidentifier: (NSString *) reuseidentifier{self    = [super Initwithstyle:style reuseidentifier:reuseidentifier];    if (self) {        [Self.contentview addsubview:[[customcontentview alloc]initwithframe:self.contentview.bounds];    }    return self;} @end
@implementation customcontentview-(ID) initWithFrame: (cgrect) frame{self    = [Super Initwithframe:frame];    if (self) {        Self.backgroundcolor = [Uicolor clearcolor];    }    return self;} -(void) DrawRect: (cgrect) rect{    nsdictionary * attributes = @{                                  nsfontattributename: [Uifont fontwithname:@] Helvetica-bold "Size:12",                                  nsforegroundcolorattributename: [Uicolor blackcolor]                                  };    [@ "I <3 IOS 7" Drawinrect:rect withattributes:attributes];} @end

2:ytknetwork's Content

Ytknetwork is an ape bank. iOS development team based on the Afnetworking encapsulated iOS network library, it implements a set of high-level APIs that provide higher levels of network access abstraction.

Ytknetwork using the Basic tutorial
Https://github.com/yuantiku/YTKNetwork/blob/master/BasicGuide.md

Ytknetwork Using Advanced Tutorials
Https://github.com/yuantiku/YTKNetwork/blob/master/ProGuide.md

3: Open and close Mac hidden files

However, by entering a command in terminal, you can display it in the Finder:

Defaults write Com.apple.finder appleshowallfiles TRUE
Killall Finder

is to modify one of the system settings, and then restart the Finder

The same goes for the finder to not show hidden files:

Defaults write Com.apple.finder appleshowallfiles FALSE
Killall Finder

4:github readme.md Add a picture

Briefly:

Put the picture in the warehouse, link it in the file, and push it to GitHub.

GitHub Image Link Format:

(http://github.com/yourname/your-repository/raw/master/images-folder/xxx.png)

Then add in readme.md:

For example: I am in my Dotvim folder next screenshots directory, there is a vim-screenshot.jpg in this directory. So the way to add links is as follows

! [Image] (https://github.com/ButBueatiful/dotvim/raw/master/screenshots/vim-screenshot.jpg)

Note: When you finish writing the Readme file for the first time, it will be saved to the project, if you want to modify it, you can modify it locally, and then push to the remote project;

5: Settings for navigation bar transparency and top layout start position

Property: Translucent

Shut down

Self.navigationController.navigationBar.translucent = NO;

Open

Self.navigationController.navigationBar.translucent = YES;

Property: Automaticallyadjustsscrollviewinsets

When Automaticallyadjustsscrollviewinsets is NO, TableView starts at the top of the screen, which is covered by the navigation bar & status bar

When Automaticallyadjustsscrollviewinsets is YES, it is also the default behavior

6:ios 7 statusbar status bar Navigationbar color change

iOS7 The following versions set the navigation bar background color to use

[[Uinavigationbar appearance] Settintcolor:[uicolor Orangecolor]];

iOS7 after:

[[Uinavigationbar appearance] Setbartintcolor:[uicolor Orangecolor]];

Default with a certain transparency effect, you can use the following methods to remove system effects

[Navigationcontroller.navigationbar Settranslucent:no];

Project needs to set the text color of the status bar to white, the following methods can be

[[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstylelightcontent];

Calls that need to be refreshed immediately after the change

[Viewcontroller Setneedsstatusbarappearanceupdate];

If there is no effect, you need to set it in the Plist file

View controller-based status bar appearance = NO

Info.plist View controller-based status bar appearance This property view controller-based status bar appearance =no This setting is: View Con Troller do not operate on status Bar display

iOS Development Basics-Fragmentation 31

Related Article

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.