Naming, not necessarily for everyone
When I open Xcode and start writing, the name always makes me very tangled.
I think it should be a good naming habit, a good name is always pleasing to the eye.
My English is not very good so my project name is generally Chinese, easy to find quickly.
Naming variables, declaring a method I think I think of a good name.
Name an object:
Object name + type abbreviation (lowercase first letter)
The first thing to think about is what this object is for and what type it is.
First think of a Chinese name, for example, I want to name a button (UIButton) of the object, button is a Send button, so we can use SENDBNT (want to add the type of name after the abbreviation), Img,label,tableview, View, Cell, Scroll, TextField (some not suitable for abbreviations)
Create a class (capitalize first letter)
Just like creating an object, it is followed by the inheritance from
such as: Create a new view controller, followed by Viewcontroller, inside the contents of the home page can be used, Mainviewcontroller
When overriding or customizing a method:
The following are commonly used in the associated words (PS: Heard Objective-c in the method like prose)
{
[with--about] What is contained in the object
[colorwithred ...]; [Initwithtitle]; [stringWithFormat];
[for--to] get something from it [Objectforkey]; []
[get--get]
where is [at]
[By]
[did--past] something that has passed, that happened after the end of the event
[will--will] execute earlier than did method
}
If you want to let yourself write something tall, or learn more English, or you can only be named AAAAA or BBBBBB
Next add ...
How to name the Ios-learning system