Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Beginning iOS 5 Application Development
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning iOS 5 Application Development
This is the forum to discuss the Wrox book Beginning iOS 5 Application Development by Wei-Meng Lee; ISBN: 978-1-1181-4425-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS 5 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 15th, 2012, 03:44 PM
Registered User
Points: 40, Level: 1
Points: 40, Level: 1 Points: 40, Level: 1 Points: 40, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 8 - Table View (Sorting of Arrays in Table View)

The syntax / script used to sort a declared array provided:
Code:
 //—-get all the keys in the dictionary object and sort them—- 
    NSArray *array = [[self.movieTitles allKeys]
                      sortedArrayUsingSelector:@selector(compare:)];
How do i set it without the arrays being sorted.
  #2 (permalink)  
Old March 15th, 2012, 10:30 PM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

The -allKeys method of NSDictionary returns an NSArray. So

NSArray *array = [self.movieTitles allKeys];

returns an unsorted NSArray.

Bob


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table frame view RockBal XSLT 3 April 5th, 2011 01:32 AM
updating the table from the list view columns Yasho VB Databases Basics 2 July 31st, 2007 02:06 AM
view table using asp code ernafarizan Classic ASP Basics 4 March 8th, 2005 07:46 PM
Table View and DB Changes rander3328 SQL Server 2000 3 September 16th, 2004 11:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.