Google 一下,發現其他人也會遇到一樣的問題:
- Disabling UIScrollView autoscroll - iPhone Dev SDK Forum
- Disable UIScrollView scrolling when UITextField becomes first responder
- Unwanted automatic scrolling with UIScrollView and UITextFields as subviews
試了網路上的解法都沒有用,最後我的做法是:
- 把原本畫面上的 UITextView 改用 UIView 取代
- 自己 alloc 一個 UITextView 然後把 text 與 style 都設定好
- 最後用 addSubview 的方式加到畫面裡
UITextView *txtView = [[UITextView alloc] initWithFrame:self.tempView.frame]; txtView.text = @"Message what you want"; txtView.backgroundColor = [UIColor clearColor]; txtView.editable = NO; txtView.font = [UIFont systemFontOfSize:16]; [self.view addSubview:txtView]; [txtView release];
It's work! 供大家參考一下
1724D910
回覆刪除ataşehir yabancı esçort
maltepe yabancı esçort
esçort siirt
aliağa esçort
pamukova esçort
esçort bayan erzurum
kepez esçort
alaşehir esçort
çayırova esçort
5FC058F9
回覆刪除Artvin
Rize
Bilecik
Sivas
Kırıkkale
Kars
Ardahan
Bayburt
Burdur