![](/img/trans.png)
[英]How can i change the properties of a UIView so it can be casted to UILable or UIImageView?
[英]How can I make UILable to respond to IBAction?
我自定義了UITableViewCell(從筆尖加載的靜態內容)。 該單元格包含一個UILable,我想在用戶點擊它時更改其值。 (將顯示PickerView,並從該用戶那里選擇該標簽的值)。
因此,我創建了以下IBAction。 但是,當我嘗試將其與該UIlable連接時,不允許這樣做。
-(IBAction)selectlanguage:(UILabel *)sender
{
/*
Code to display pickerview and select appropriate language
*/
self.languageLable.text=@"Spanish";
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.userTranslationLanuage = @"en|sp";
}
誰能告訴我我想念的東西嗎?
薩米特
只需在連接到此IBAction的標簽上放置一個不可見的按鈕即可。 UILabel對象無意直接響應用戶的觸摸。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.