Home News Forum Social Networking Support Us Advertise

Spanish Lesson 1 ($1.99)

aWake!Gently ($1.99)

The Bird & The Snail - Knock Knock - Deluxe ($4.99)

Match-It Trains ($0.99)

Tangled ($0.99)

iFlatter ($0.99)

The 15 puzzle ($0.99)

Tap Forms Database ($8.99)

Higher or Lower Card Game (Hi Lo) ($0.99)

Red Pixel ($0.99)

Time-Shift Radio ($0.99)

Want your application advertised here? Only $10/week!

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2008, 09:41 AM   #1 (permalink)
Junior Member
 
Join Date: Oct 2008
Posts: 6
Rep Power: 0
soffa is on a distinguished road
Default Get creater

Hi.

I have a ViewController and in it a UIView-object created. In the UIView i have an ImageView and a toolbar. By clicking on the toolbar, is it possible to call a viewController-function?

In the viewController i have an object called myView, but in the view i need something like 'myCreator'.

Is there something?
soffa is offline   Reply With Quote
Old 11-17-2008, 04:07 PM   #2 (permalink)
iPhone Developer
 
Join Date: Sep 2008
Location: Canada
Posts: 82
Rep Power: 1
Henning is on a distinguished road
Default

I'd do some reasearch on IBAction.
Henning is offline   Reply With Quote
Old 11-18-2008, 10:20 AM   #3 (permalink)
Junior Member
 
Join Date: Oct 2008
Posts: 6
Rep Power: 0
soffa is on a distinguished road
Default

i create the view with
UIView mainView = [[UIView alloc] initWithFrame:displayRect];
in the viewController programmically.

so i have no IBActions or IBOutlets.

i create the buttons with
UIBarButtonItem *btn1 = [[UIBarButtonItem alloc] initWithTitle:@"Load" style:UIBarButtonItemStyleBordered target:self action:@selector(btn1Func];

but the target should not be the UIView itself, it should be the 'creator' here the viewController.

Last edited by soffa; 11-18-2008 at 10:24 AM.
soffa is offline   Reply With Quote
Old 11-18-2008, 10:27 AM   #4 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 13
Rep Power: 0
lawicko is on a distinguished road
Default

The best way to do what you want to do is to subclass UIToolbar, create protocol for passing needed information for your subclass, then implement protocol in your view controller. Something like delegate concept, really useful stuff.
lawicko is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements


» Stats
Members: 8,231
Threads: 20,199
Posts: 90,216
Top Poster: RickMaddy (2,121)
Welcome to our newest member, OneGlobe
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:43 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0