I’m writing a dictionary app to study iOS and I’ve implemented a UITableView with the alphabet as section titles and an index of all the letters on the right side. It works perfectly, but is it possible for me to display the selected index in a box at the center of the screen? I’m looking at the UITableViewDelegate reference but can’t see any methods I might override. Help?
I’m writing a dictionary app to study iOS and I’ve implemented a UITableView with
Share
You’d have to manually create a
UIViewthat you put above theUITableViewwhich then shows the letter or whatever you want to present. Make sure not to add it to the table view itself as it’s aUIScrollViewsubclass and your view would be affected by itscontentOffset.When the user presses one index or moves his finger above it, this callback gets called:
Use it to change your view’s contents and make it visible and set a timer for it to fade out again.