iOS development--Initial knowledge

Source: Internet
Author: User

Pragram preprocessing directives
    • #pragram Mark

      Code logical Chunking

Common shortcut keys
    • View Document Description

      Select the API you want to view, and press and hold the option+ button:

    • Comments

      CMD +/

Framework
    • Masonry

      AutoLayout
      http://adad184.com/2014/09/28/use-masonry-to-quick-solve-autolayout/
      ? # # # Use note
      ? + Case
      ? Make.left.equalTo (Self.contentview). Offset (12);
      Make.top.equalTo (Self.contentview). Offset (18);
      Make.size.width.mas_equalTo (32);
      Make.size.height.mas_equalTo (32);
      Each property setting is written separately, because it is a chained syntax, and if all of the properties are configured together, the following settings override the previous setting.
      ? + Center
      Make.center >?
      ? + Vertical Center
      ?> Make.centery
      ? + Horizontal Center
      ?> Meke.centerx

Tools
    • Cocoapods

      Program Dependency Management
      http://blog.devtang.com/2014/05/25/use-cocoapod-to-manage-ios-lib-dependency/

Control
    • Uiimageview

      Http://blog.sina.com.cn/s/blog_9c2363ad0101e15l.html

    • UITableView

      https://www.kancloud.cn/digest/ios-1/107419

      • Set Uitableviewdelegate, attempt to load delegate
      • Set Uitableviewdatasource, data binding
      • You can customize the cell, you need to inherit UITableViewCell
    • Uitextview

      Similar to the EditText inside Android

    • UILabel

      Text

      • Rich Text
        > HTTPS://WWW.JIANSHU.COM/P/5D24D22F99C3
    • UIButton
Api
    • Uifont

      Set Text font

    • Uitableviewdelegate
    • Uitableviewdatasource
Abnormal
    • Compilation failed, symbol conflict

      Due to import. m file, resulting; import. h file after compilation succeeded;

    • Unrecognized selector sent to instance

      Sent a message to the nil object

    • The custom UITableViewCell is not called by UI TableView

      You need to call UITableView's RegisterClass method to register the custom cell

    • Nsinternalinconsistencyexception

      Reason: ' couldn ' t find a common Superview for <UITextView:0x7fdb4d015200;
      Cause: The Addsubview method was not called to add the view to the parent view before setting the view constraint.
      Workaround: The Addsubview method that calls Parentview after the view initialization is complete;

iOS development--Initial knowledge

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.