Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这似乎是一个愚蠢的问题,但我不太记得如何子类化 UIView。谁能指出我正确的方向?
示例(.h 文件):
#import <UIKit/UIKit.h> @interface MySubclassedView : UIView { } @end
或者,只需在您的项目中添加一个新类并告诉 XCode 进行子类UIView化,就会创建模板。
UIView