I want to display some hint to user when a user touches the button in iPhone native application, just like tooltip in web applications.
I have a large number of TextField that should be associated with info button to let the user know the detail description about the data captured in that TextField.
Can any one post steps to achieve this?
Agreed with Justin, but if you really had to:
Add an action to the UIButton that launches on the Touch Down event, e.g.
UIButton * button = [[UIButton alloc] init]; [button addTarget:self action:@selector(doSomething:) forControlEvents:UIControlEventTouchDown];Define the ‘doSomething’ action method as showing a custom ‘tooltip’ view anchored to the button location. The
UIButtonwhich was touched will be passed to the action method, from which you can access its location and so know where to anchor the tooltip.If this all sounds laborious, check out “Is it possible to show a tooltip in an iOS app?“, which links to CMPopTipView (https://github.com/chrismiles/CMPopTipView#readme), a useful package which will do it all for you. Haven’t used it myself, though.