我有視圖添加爲視圖中的子視圖在視圖中加載方法它工作正常,但在該方法的視圖的setFrame屬性然後如果我隱藏該視圖然後它不隱藏,我認爲由於setFrame屬性它不隱藏視圖。如何在應用setFrame屬性後隱藏任何UIView
NineView=[[UIView alloc] initWithFrame:CGRectMake(570,300,50,-height9)];
NineView.backgroundColor=[UIColor colorWithRed:(102/255.f) green:(107/255.f) blue:(40/255.f) alpha:1];
[self.view addSubview:NineView];
和SETFRAME後,如果我隱瞞這一觀點則沒有隱瞞其
[NineView setFrame:CGRectMake(570,300,50,-height9)];
哪裏是你的躲,視點編碼 –
@Jdeveloper iPhone爲你THR? –
爲什麼使用「initWithFrame」方法,然後使用「setFrame」方法?兩種方法都會導致相同的事情。 另外..請再粘貼一些代碼,以便我們可以更好地瞭解您到底在做什麼。 – Shailesh