我有一個記錄按鈕,當按下時,我想隱藏說明按鈕。當另一個UI按鈕被按下時隱藏一個UI按鈕
這裏的備案按鈕的代碼:
// Create custom overlay
// Create instruction/record button
// Add instruction/record button to custom overlay
[_videoRecordBtn addTarget:self action:@selector(startVideoRecord:) forControlEvents:UIControlEventTouchUpInside];
所以在startVideoRecord我應該是這樣:
-(IBAction)startVideoRecord:(id)sender{
[_instru setHidden:YES];
// start recording...
}
但我不知道怎麼過來startVideoRecord
通過_instru
按鈕。
讓你的''instru''是一個類的屬性。然後你可以通過'self.instru''訪問它,並將它設置爲''self.instru.hidden = YES;'''在你的課程的任何地方。 – damirstuhec
你能解釋__pass _instru按鈕來啓動VideoRecord__嗎? –
你可以使_instru按鈕在全局上定義在.h文件上 – morroko