Requirement:
- Alphabets in a row
- Using swipe gesture, user can swipe alphabets left to right & vice versa
- A circle/magnifying glass in center, which will enlarge the character in center
In iOS, I want to show alphabets in a row that can be scrolled from left to right & right to left using swipe gestures. In the center, there would be a magnifying glass/circle like thing that would show enlarged version of the alphabet currently in center. This bigger size shows that user wants to select that character.
For eg: below characters would be scrollable horizontally and D would appear under a circle/magnifying glass with a big sized font marking user's selection.
A B C D E F G
Need this in iOS 8 & Xcode 6 using swift. I understand cocoa-touch might also come in picture & I am comfortable with it
Based on the requirements you need, use
UICollectionView
. It is similar to a table view but more flexible. You can browse the Apple documentation on working withUICollectionView
s.https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionView_class/
Here's a summary of the advantages of
UICollectionView
: http://nshipster.com/uicollectionview/To implement the magnifying feature, you might want to use the
UICollectionViewDelegate
method:-layoutAttributesForElementsInRect:
,where you can set attributes for cells inside that rect (scale up the size for example). It is also explained in the link above.