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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-04-2009, 09:37 AM   #2 (permalink)
oohmyygoood
Registered Member
iPhone Dev SDK Supporter
 
Join Date: May 2009
Posts: 49
Default Solved

I stumbled upon the answer myself.

I had created a UIButton with this code:

Code:
UIButton *b = [UIButton buttonWithType:UIButtonTypeRoundedRect];
....;
....;
[b release]
What works is the following:

Code:
UIButton *b = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
....;
....;
[b release]
I'm not sure I understand why it needs to be like that, but there you go. :-)
oohmyygoood is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,843
Threads: 89,211
Posts: 380,652
Top Poster: BrianSlick (7,129)
Welcome to our newest member, nataliekendal
Powered by vBadvanced CMPS v3.1.0

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