2
私は奇妙な問題が発生しました。添付された2つのスクリーンショットを見ることができます。問題は、欠陥、未知の白い長方形の欠陥です。 2番目のスクリーンショットでキーボードの一部が消えてしまった。setMasksToBoundsのときにApp UIに欠陥があります。
デバイスとテストは同じ問題である...
誰もが理由かもしれないものを知っていますか?色々ありがとう。誰のための
textFieldDidBeginEditing
- (void)textFieldDidBeginEditing:(UITextField *)textField{
DEBUGLog
if (!isIPAD) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
if (!viewFrameUp) {
viewFrameUp=YES;
self.navigationController.navigationBar.alpha=0;
self.view.frame = CGRectOffset(self.view.frame, 0, -self.navigationController.navigationBar.frame.size.height);
}
CGPoint point = [textField.superview convertPoint:CGPointMake(0, 0) toView:maintable];
CGPoint contentOffset = maintable.contentOffset;
contentOffset.y=point.y-10.0-self.navigationController.navigationBar.frame.size.height; // Adjust this value as you need
[maintable setContentOffset:contentOffset];
[UIView commitAnimations];
}
if ([cellTextFields indexOfObject:textField]==0) {
[keyBoardControl setEnabled: NO forSegmentAtIndex:0];
[keyBoardControl setEnabled: YES forSegmentAtIndex:1];
} else{
[keyBoardControl setEnabled: YES forSegmentAtIndex:0];
[keyBoardControl setEnabled: YES forSegmentAtIndex:1];
}
}
これはいつ発生しますか?これらの問題につながるステップは何ですか?キーボードが表示された後で追加の作図をしていますか? – bneely
ありがとう、私はtextFieldDidBeginEditingで質問を更新しました。アプリケーションは普遍的な、私はiPhoneのtableview.contentOffsetを上下に設定した。問題を再現するには、1. viewcontrollerを押し、2.編集するUItextfieldを1つ選択します。 3、別のテキストフィールドに変更して編集します。その後、問題が発生します –
あなたのkeyBoardControlはどのような種類のオブジェクトですか? – bneely