编译过了 谢谢大佬 请问大佬 有没像这样类似细节要注意的 有没谁整理过这样的文档
楼上大佬给我方法 编译过了 谢大佬一直关注指导
有个大佬给 解决方案 [[self navigationController] popViewControllerAnimated:YES]; 可以关注下
有个大佬给 解决方案 [[self navigationController] popViewControllerAnimated:YES]; 编译过了
可以关注下 谢谢指导
类似self.view取不到的情况,调用get方法获取
好的 谢大佬 会记住的 可是我看到别人代码好像可以获取 这是不是配置过什么啊
问个问题哈 大佬
我在同一个Tweak.xm 中 用%hook扣住两个类
%hook A
end
%hook B
end
我想在B中初始化A 怎么办 具体代码如下
@interface BaseMsgContentViewController
-(void)AsyncSendMessage:(id)arg1;
%hook BaseMsgContentViewController
-(void)viewDidAppear:(BOOL)animated
{
%orig;
}
//异步发送消息
- (void)AsyncSendMessage:(id)arg1
{
%orig;
}
%end
%hook NewMainFrameViewController
-(void)viewDidAppear:(BOOL)animated
{
%orig;
[[self navigationController] pushViewController:[[BaseMsgContentViewController alloc]init] animated:YES];
}
- (void)tableView:(id)arg1 didSelectRowAtIndexPath:(id)arg2
{
%orig;
}
%end
你一开始告诉我的类型不对当然过不了编译了啊
难道就没人发现你定义类写错了吗
@interface BaseMsgContentViewControlle:MMSearchBarDisplayController // where is 'r'
改过来好像也不行
那是我失误 可是 我改过来也不对 我这样的写法是对的吗
你把 @interface
后面的 'r'
补上,就可以使用 self.navigationController
了。
另外如果你要创建一个实例对象,应该通过 runtime 创建:
[[NSClassFromString(@"BaseMsgContentViewController") alloc] init];
直接 [[BaseMsgContentViewController alloc] init]
会有 link error
好的 谢谢 我试试
谢大佬 已经可以了 请问完整语言学习的资料
没啥资料,多看看 OC 基础就行
好的谢谢大佬
眼睛是真的尖
明明定义了 @interface
却报错在 @class
这一看就知道命名不一样了,仔细一看少了个字母。。。
很有经验,一看就是经常写bug的人(逃