2011-11-22 188 views

回答

2

UIView有一個屬性clipsToBounds。將其設置爲YES爲您的superView將使所有超出其界限的視圖被裁剪。

+0

是的,它的工作原理。謝謝! – world000

+0

你讓我的一天... :) – innodeasapps

0

我希望您已將您的標籤與您的IB連接起來,並在宣佈您的UILabel時使用IBOutlet。 即 在.h文件中與你在IB創建的標籤

 IBOutlet UILabel *myLabel; 

鏈接myLabel。 如果你已經這樣做

只是使用[myLabel removeFromSuperview];

它會工作。

相關問題