0
我想從SecondViewController.m的名爲ScanAnimation.m的文件中調用名爲animateRight的函數。在UIView類中調用一個函數?使用Xcode上的Obj C
在SecondViewController.m頂我:
ScanAnimation * Animation = [[ScanAnimation alloc] init];
和我打這個電話有:
[Animation animateRight];
,我得到的錯誤:
'ScanAnimation' 未申報
我在做什麼錯了?
確定現在我得到下在頂部加入
#import "ScanAnimation.h"
「。 - animateRight'not found ... – Sciguy77好吧,您需要在ScanAnimation類的頭文件中聲明它。你所做的就是複製 - (void)animateRight部分並將其放入頭文件中。 - (無效)animateRight; –