Amazon.com Widgets delegates question
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 18, 2013, 10:37:18 AM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Chapter Study
| | |-+  Chapter 21 - Writing iPhone Applications
| | | |-+  delegates question
Pages: [1]   Go Down
Print
Author Topic: delegates question  (Read 486 times)
dharr19
Full Member
***
Posts: 175


Email




« on: October 03, 2011, 11:35:27 AM »

Hi Stephen,

I was trying to figure out a good example for a delegate and was hoping for some input.

Cheers
David
Logged
skochan
Administrator
Hero Member
*****
Posts: 3103







« Reply #1 on: October 03, 2011, 12:37:47 PM »

 Look at the UITableView class.
Logged
dharr19
Full Member
***
Posts: 175


Email




« Reply #2 on: October 03, 2011, 03:47:44 PM »

So really the UITableView is actually the delegate and the protocols just define how to work with the class?

Logged
fujilla
Global Moderator
Sr. Member
*****
Posts: 270


WWW




« Reply #3 on: October 04, 2011, 01:22:56 AM »

Hi David,

What Steve means is that there is UITableViewDeletate protocol which you must adopt when using the UITableView class.

This has optional methods (no required methods like the UITableViewDataSource protocol) for you to implement which allows you to for instance control what happens when a row in the table is selected.

I suggest you look at the UITableViewDelegate Protocol Reference: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableViewDelegate_Protocol/Reference/Reference.html
and also the UITableView Programming Guide: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html

Nick
http://myfirstiphoneapp.co.uk
http://easyintervalsapp.co.uk
Logged
dharr19
Full Member
***
Posts: 175


Email




« Reply #4 on: October 04, 2011, 07:13:56 AM »

Thanks Nick,

Now this makes sense to me:)  Also thanks for the links as well.

Cheers
David
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.