【发布时间】:2017-03-30 10:05:55
【问题描述】:
我已经搜索并搜索了这个问题的答案,我发现的解决方案似乎不起作用,所以我想我做错了什么:我想调用这个方法
-(void)customFade:(UILabel *)theLabel withDelay:(float)delayAmount {
[UIView animateWithDuration:0.5
delay:delayAmount
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
[theLabel setAlpha:1.0f];
[theLabel setAlpha:0];
}completion:nil];
}
从一个名为 View Controller 的 VC 到另一个,但尽管导入了它,但它没有被识别...这是我在所需 VC 上尝试的内容:
- (void)viewDidLoad {
[super viewDidLoad];
ViewController *ViewController = [[ViewController alloc] init];
[ViewController customFade:_label withDelay:0.3];
}
警告说““ViewController”没有可见的@interface声明选择器分配
有人可以帮帮我吗?我是新手,谢谢
【问题讨论】:
-
你是从
UIViewController继承ViewController吗? -
“ViewController”是否有 xib 或内部故事板?
-
检查是否在ViewController类的接口文件(.h文件)中声明了这个方法。您可能需要在 ViewController 类的接口文件中公开该方法才能访问它
标签: ios objective-c