按照这个流程操作
1.继承 UISearchBar ,
2.重写了- (id)init;和- (id)initWithFrame:(CGRect)frame
3.调用Recommend_searchBar *searchbar = [[Recommend_searchBar alloc] init];
4.发现- (id)initWithFrame:(CGRect)frame 中的代码也被调用了。
谁能解释下啊。
本文深入探讨了Objective-C与Swift两种编程语言在iOS开发领域的应用,包括它们各自的优势、特点以及如何在实际项目中进行选择与使用。
按照这个流程操作
1.继承 UISearchBar ,
2.重写了- (id)init;和- (id)initWithFrame:(CGRect)frame
3.调用Recommend_searchBar *searchbar = [[Recommend_searchBar alloc] init];
4.发现- (id)initWithFrame:(CGRect)frame 中的代码也被调用了。
谁能解释下啊。
1108

被折叠的 条评论
为什么被折叠?