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 04-19-2009, 11:15 PM   #8 (permalink)
DGYWFT
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default

Eddie,
I think that all sounds great in theory and the right way, but everytime I try that, its back to the error. For example I define it in the viewcontroller, and then try this instead:

Header :

Code:
#import <UIKit/UIKit.h>
@class MainViewController; 

@interface MainView : UIView {
	UIImage			*myUIImage;
	MainViewController *mvc;
}

@property (nonatomic, retain) UIImage	*myUIImage;
@property (nonatomic, retain) MainViewController *mvc;
@end

Methods:
Code:
#import "MainView.h"
#import "MainViewController.h"
#import <QuartzCore/QuartzCore.h>

@implementation MainView
@synthesize myUIImage, mvc;

- (void)drawRect:(CGRect)rect {
	
	NSLog(@"drawRect go");
	myUIImage = [UIImage imageNamed:mvc.imagePath]; // Code breaks here
	NSLog(@"drawRect go again"); // This never runs
DGYWFT is offline   Reply With Quote
 

» Advertisements
» Online Users: 450
17 members and 433 guests
apatsufas, aziz, ChrisYates, Dimpleppanchal, Duncan C, Gaz, Hamy, iLearnColors, itra, jeroenkeij, LegionMD, mehmood.memon, monu_rastogi, mraalex, Paxtorn, Robemtims, smithdale87
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,617
Threads: 94,087
Posts: 402,799
Top Poster: BrianSlick (7,990)
Welcome to our newest member, kellyschoemaker
Powered by vBadvanced CMPS v3.1.0

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