开发者

Iphone textfield display cursor

开发者 https://www.devze.com 2023-03-13 08:14 出处:网络
i\'m developing a calculator for iphone. The design is similar to this: The problem is that i can\'t show the cursor in my textField because the input is managed from buttons like the image. Moreov

i'm developing a calculator for iphone. The design is similar to this:

Iphone textfield display cursor

The problem is that i can't show the cursor in my textField because the input is managed from buttons like the image. Moreover [textField becomeFirstResponder ] doesn't work because it shows the default keyboard.

So i tried to

textResultado.inputView = scrollView;

but then the tabBarController can't receive touch events because my custom keyboard contained in the scroll view is over it.

The caption is from an app in the AppStore so must be a way in order to solve this problem (show开发者_如何学Python the cursor in a TextField using a different inputView and the tabBar still working fine).

Anyone can help me?


Create an input view which is invisible and then make textResultado the first responder.

textResultado.inputView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
[textResultado becomeFirstResponder];


I discover that using this solution you can have strange flickering of the gui on iPhone 4 with iOS 6.1.3. iPhone 3Gs with iOS 6.1.3 works correctly.

The flicker appears when text area is selected and a dialog window appears. Closing the dialog window causes flickering.

0

精彩评论

暂无评论...
验证码 换一张
取 消