Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
- Subject: Re: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
- From: Scott Ribe <email@hidden>
- Date: Wed, 03 Dec 2008 17:33:49 -0700
- Thread-topic: Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
> -(CGPoint)getLocalPoint: (UIView*) localView : (CGPoint) globalPoint {
I addition to what others said about using a keyword to name each argument,
I think I see a little confusion in that about position of names vs types.
To an Objective-C person that declaration (and the following call) are very
hard to read because they're so contrary to convention. Here's a
conventional-looking version:
- (CGPoint) getLocalPointFromGlobalPoint: (CGPoint) globalPoint inView:
(UIView*) localView {
... Use globalPoint and localView arguments here
}
And
someView.center = [self getLocalPointFromGlobalPoint: CGPointMake(320 / 2,
480 / 2) inView: anotherView];
A couple of pointers:
- Feel free to ignore the spacing. That's my own preference.
- The longer more descriptive name is more in line with the way you'll
usually see things done in Cocoa, but personally I probably would have gone
with a shorter name like your original--assuming the method is intended for
private use rather than a widely-visible name.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden