Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-12-2010, 02:38 PM   #13 (permalink)
mickm
Registered Member
 
Join Date: Jun 2009
Posts: 285
mickm is on a distinguished road
Default

Quote:
Originally Posted by mr tickle View Post
ok, go here, and download the zip

its a solution i did for a post on another thread

http://www.de-clunk.com/buttonsGalore.zip

in there, the 2 classes you want to focus on are maincontroller.h and .m and button.h and .m

in button.h, i make the class maincontroller available to button.h
@class maincontroller

and then i declare a property

maincontroller *parentLink;
and
@property(assign,nonatomic)maincontroller *parentLink;

this creates the pointer, but it only knows that its of the class maincontroller

now, in the maincontroller.m file, i say obj.parentLink = self;

so when i generate the UIView object, im telling it that i want to create a symbolic (thats what i call it anyway) link back to mainController

this means, from any uiview that is generated in maincontroller object, i can reach back and run its methods, there fore creating the link.

when you build and go in the buttonsGalore project, click one of the buttons, it traces in NSLog (look at the console) showing that a method from the mainController was run, and was called in a subview.
downloaded it, i'll check it out.

thanks!
mickm is offline   Reply With Quote
 

» Advertisements
» Online Users: 793
13 members and 780 guests
bomzie, carmeliaxw97, HemiMG, ilmman, iOS.Lover, MarkC, mkjarred, preussie, reficul, samball, Sophie100, stevenkik, thassman
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,473
Threads: 94,040
Posts: 402,625
Top Poster: BrianSlick (7,978)
Welcome to our newest member, iram91417
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:39 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.