There is no ready-made tool for code completion of files like yours. You can only write the Xcode plug-in yourself and put all the keywords and system method names in the SDK. Or use a text editor. Generally, text editors are more convenient to define your own syntax highlighting and code completion.
There seems to be no easier way to explain attributes. However, you don’t need to define them one by one in advance. You can use respondsToSelector 或 performSelector: NSSelectorFromString(set...)来设置属性值。对css里的属性名进行首字母大写然后前面加个 "set" 就是方法名了。 class_copyMethodList to get all the methods of a certain class at runtime. Be careful to avoid crashes.
It is better to use autolayout directly when writing css. Third-party autolayout can define constraints using code and configuration files, which is similar to css definition.
Some people have done a lot of research on CSS layout before, you can study their code. For example https://github.com/gavinkwoe/... For example https://github.com/hackers-pa... For example https://github.com/tolo/Inter... Facebook also had a project before but abandoned that project a few years ago.
There is no ready-made tool for code completion of files like yours. You can only write the Xcode plug-in yourself and put all the keywords and system method names in the SDK. Or use a text editor. Generally, text editors are more convenient to define your own syntax highlighting and code completion.
There seems to be no easier way to explain attributes. However, you don’t need to define them one by one in advance. You can use
respondsToSelector
或performSelector: NSSelectorFromString(set...)
来设置属性值。对css里的属性名进行首字母大写然后前面加个 "set" 就是方法名了。class_copyMethodList
to get all the methods of a certain class at runtime. Be careful to avoid crashes.It is better to use autolayout directly when writing css. Third-party autolayout can define constraints using code and configuration files, which is similar to css definition.
Some people have done a lot of research on CSS layout before, you can study their code. For example https://github.com/gavinkwoe/... For example https://github.com/hackers-pa... For example https://github.com/tolo/Inter...
Facebook also had a project before but abandoned that project a few years ago.
If you create it like css, you can just create a bunch of base classes, or categories