3
我已經看遍了所有的堆棧溢出,爲這個問題的答案,我只能找到4.1和以下的工作方式,但對於4.2.1和以上,我無法找到一個新的獲取ON和OFF文本的方式改變。是否有改變可以說是和的方式 號這是我目前:另一個自定義的UISwitch問題
UISwitch *switchControl = [[UISwitch alloc] initWithFrame:frame];
[switchControl addTarget:self action:action forControlEvents:UIControlEventValueChanged];
switchControl.backgroundColor = [UIColor clearColor];
switchControl.on = value;
[cell addSubview:switchControl];
[switchControl release];
會有什麼改變UISwitch文本的最簡單的方法?或者,如果我製作兩幅圖像並使用動畫使它們流動,它會更容易,就像它是一個普通的UISwitch。