Can I add an alphabet jump list to a tableview like the contact list
There is a comprehensive tutorial on how to do it in the "Table View Programming Guide", called "Populating an Indexed List".
Moreover, if you also need to have the search functionality (the magnify icon), there are two well written solutions:
- http://iamthewalr.us/blog/2009/12/uisearchdisplaycontroller-and-uilocalizedindexedcollation/
- http://lukeredpath.co.uk/blog/using-uilocalizedindexedcollation-with-searchable-table-views.html
What is the Vertical Alphabet in the iOS Phonebook Called?
It's called an "indexed list" or "section index" in the documentation.
For a quick hint, look at the documentation for the UITableViewDataSource
sectionIndexTitlesForTableView:
and tableView:sectionForSectionIndexTitle:atIndex:
methods.
For more detailed information, check out the Populating an Indexed List section of the Table View Programming Guide
Displaying Elements in UITableView like iPhone contacts, separated into alphabetical sections?
Add alphabetic sections to ur tableview, then You have to create array of alphabets corresponding to the section in tableview. Like section[0] - 'A', section[1] - 'B', etc.
Add
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
return keys;
}
//the delegate is asking for an array of the values to display in the index.
So the first item in this array will take the user to the first section, which is section 0.
How to get a TableViewCell like Phone.app-Recents tab or Mail.app-mail list
Maybe change the accessoryView
of the cell, as there is no 'style' like the the one you want. Still, a custom cell class might make things easier.
An enumeration for the various styles of cells.
typedef enum {
UITableViewCellStyleDefault,
UITableViewCellStyleValue1,
UITableViewCellStyleValue2,
UITableViewCellStyleSubtitle
} UITableViewCellStyle;
The type of standard accessory control used by a cell.
typedef enum {
UITableViewCellAccessoryNone,
UITableViewCellAccessoryDisclosureIndicator,
UITableViewCellAccessoryDetailDisclosureButton,
UITableViewCellAccessoryCheckmark
} UITableViewCellAccessoryType;
Sorting Array of Objects alphabetically based on a string attribute
There are several good examples here on SO. Here is a good example:
How to sort an NSMutableArray with custom objects in it?
How to check MPMusicPlayerController permission?
MPMediaLibraryAuthorizationStatus authorizationStatus = MPMediaLibrary.authorizationStatus;
switch (authorizationStatus)
{
case MPMediaLibraryAuthorizationStatusAuthorized:
{
break;
}
case MPMediaLibraryAuthorizationStatusNotDetermined:
{
break;
}
case MPMediaLibraryAuthorizationStatusRestricted:
case MPMediaLibraryAuthorizationStatusDenied:
{
break;
}
}
Related Topics
How to Copy SQLite Database When Application Is Launched in iOS
Return Value from Completion Handler - Swift
Mkmapview Show Incorrectly Saved Region
How to Send Multiple Parameterts to PHP Server in Http Post
How to Invoke iPhone Maps for Directions with Current Location as Start Address
Uirefreshcontrol on Uicollectionview Only Works If the Collection Fills the Height of the Container
iOS - 'Myproject-Swift.H' File Not Found When Running Unit Tests for Swift
Can't Connect Iboutlet in Interface Builder
How to Get the iOS Device CPU Architecture in Runtime
Firebase Chat Push Notifications
Various Itms Errors When Trying to Submit Archive to App Store
Disable Bounce Effect in Uipageviewcontroller
iPhone Different Screen Sizes in Flash? (Getting Black Bars)
Could Not Insert New Outlet Connection: Could Not Find Any Information for the Class Named