Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: beginner obj-c question



On Apr 4, 2008, at 1:03 PM, Baiss Eric Magnusson wrote:
That helped, the actual call I wanted, I think, is:
UIButton *button = [self makeButton: @"Button.png" : @"Login" ];

Which compiled fine, you had < bkgrdImage> in the line and that caused a warning, I don't grok named parameters yet.

You need to go read the intro to objective-c documentation.   Apple provides excellent documentation for getting started with Objective-C, working with the system provided frameworks, and dealing with such details like memory management.

Objective-C does not have named parameters.

You would almost never see a method declared like this:

- (UIButton *)makeButton: (NSString *)bkgrdImage: (NSString  *)btnName  {

Instead, it would likely be something like:

- (UIButton *)makeButton: (NSString *) buttonName withBackgroundImageNamed: (NSString *) imageName

b.bum
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden

References: 
 >Re: beginner obj-c question (From: Baiss Eric Magnusson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.