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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-22-2009, 07:59 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Colombo, Sri Lanka
Posts: 58
Send a message via Yahoo to tharindufit Send a message via Skype™ to tharindufit
Default UIToolbar Enable Disable Warning

hai
I have a UIToolbar in my application as an IBOutlet, with code I am enabling and disabling in following mannar
Code:
[toolbar setEnabled:NO];
[toolbar setEnabled:YES];

but when I run my application it displays a warning below these lines. But application works fine with enabling and diabling. Why is that? What went wrong in my App
tharindufit is offline   Reply With Quote
Old 01-22-2009, 09:34 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,558
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

What warning does it display
smithdale87 is offline   Reply With Quote
Old 01-22-2009, 12:32 PM   #3 (permalink)
New Member
 
Join Date: May 2008
Posts: 99
Default

Is setEnabled a documented message of UIToolbar? I can't find it in the docs.
bgeerdes is offline   Reply With Quote
Old 01-22-2009, 12:39 PM   #4 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 1,431
Default

You have to enable/disable the individual bar button items.
PhoneyDeveloper is offline   Reply With Quote
Old 01-22-2009, 10:49 PM   #5 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Colombo, Sri Lanka
Posts: 58
Send a message via Yahoo to tharindufit Send a message via Skype™ to tharindufit
Default

UIView classes have the enabled property, as a subclass of UIView, UIToolbar should have the enabled property, But it is not documented. Then is it called an Undocumented API call. But documentation says UIToolBar is a sub class of UIView, then if I convert my IBOutlet from UIToolbar to id or UIView will it call an Undocumented API call, I am so confused, can somebody explain me about these undocumented concept.
tharindufit is offline   Reply With Quote
Old 01-22-2009, 11:05 PM   #6 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Colombo, Sri Lanka
Posts: 58
Send a message via Yahoo to tharindufit Send a message via Skype™ to tharindufit
Default

I had five UIToolBar items, there fore i did it with this manner without warning. But I still wonder why Apple did not have enabled property documented, is there any reason?
Code:
for(UIBarButtonItem *button in [toolBar items]) {
	button.enabled = YES;
        //button.enabled = NO;
}
tharindufit is offline   Reply With Quote
Old 01-22-2009, 11:27 PM   #7 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,122
Default

It is documented. A UIBarButtonItem extends UIBarItem. UIBarItem has an 'enabled' property.
RickMaddy is offline   Reply With Quote
Old 01-22-2009, 11:39 PM   #8 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 1,431
Default

@ tharindufit, you are mistaken. UIView does not have an enabled property. UIControl has an enabled property. And as I mentioned UIBarItem has an enabled property.
PhoneyDeveloper is offline   Reply With Quote
Old 01-23-2009, 12:04 AM   #9 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Colombo, Sri Lanka
Posts: 58
Send a message via Yahoo to tharindufit Send a message via Skype™ to tharindufit
Default

yep, I am sorry, it is also not documented, its with UIControll classes as you said. It means Apple did not want to give users the ability to enable disable UIViews, mm its fine for some extent, I just got it now, thanks guys
tharindufit is offline   Reply With Quote
Old 01-23-2009, 10:16 AM   #10 (permalink)
New Member
 
Join Date: May 2008
Posts: 99
Default

Quote:
Originally Posted by RickMaddy View Post
It is documented. A UIBarButtonItem extends UIBarItem. UIBarItem has an 'enabled' property.
Except that we're talking about UIToolbar.
bgeerdes is offline   Reply With Quote
Old 01-23-2009, 01:06 PM   #11 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,122
Default

Quote:
Originally Posted by bgeerdes View Post
Except that we're talking about UIToolbar.
The post I replied to was talking about UIBarButtonItem.
RickMaddy is offline   Reply With Quote
Old 01-24-2009, 10:12 PM   #12 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: Colombo, Sri Lanka
Posts: 58
Send a message via Yahoo to tharindufit Send a message via Skype™ to tharindufit
Default

Can we guess any reasons why Apple not documented enabled property for views like UIToolbar, if we use any undocumented calls in our App will it reject at AppStore. Just to know
tharindufit is offline   Reply With Quote
Reply

Bookmarks

Tags
disable, enable, iphone, uitoolbar, warning

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: 158,884
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, karlam963
Powered by vBadvanced CMPS v3.1.0

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