kevin36524 / simpleTodos

Simple Todos for Yahoo IOS assignment 2
0 stars 0 forks source link

Review my assignment2 #1

Open kevin36524 opened 11 years ago

kevin36524 commented 11 years ago

My app is a complete, please review.

1) Also, I have a question So in order to remove the keyboard I am attaching a UIGestureRecognizer But however this doesnot work on navigationControllerBar.

? /cc @nesquena @timothy1ee

timothy1ee commented 11 years ago

Kevin, nice work. The UIGestureRecognizer is attached to a view, and the view doesn't extend to the navigationBar. If you want to handle clicks on the navigationBar, you have to attach to it separately. Some minor feedback:

- (IBAction)editingBegins:(id)sender {
    if ([self.delegate respondsToSelector:@selector(todoCell:onBeginEditing:)]) {
        [self.delegate todoCell:self onBeginEditing:sender];
    }
}

Good work!

kevin36524 commented 11 years ago

Thanks sir for reviewing my assignment.

However I still have a doubt about synthesize.

I read somewhere that XCode by default inserts something like

@synthesize foo = foo;

So here the backing instance variable is foo. So if in my code if i accidentally use foo instead of self.foo then XCode won't complaint but my custom getters and setters won't be called.

on the contrary if i use

@synthesize foo = _foo

Then XCode will never allow me to use foo.

So I am not sure as to whether it is just some paranoid coding style or industry accepted standard.

Kindly correct me if wrong.

Thanks Again Kevin

/cc @nesquena @timothy1ee

timothy1ee commented 11 years ago

I think the default is actually _foo.  You can test it by removing the synthesize and continuing to use _foo, and it won't complain or crash. — Sent from Mailbox for iPhone

On Wed, Aug 14, 2013 at 6:38 AM, Kevin Patel notifications@github.com wrote:

Thanks sir for reviewing my assignment. However I still have a doubt about synthesize. I read somewhere that XCode by default inserts something like

@synthesize foo = foo;

So here the backing instance variable is foo. So if in my code if i accidentally use foo instead of self.foo then XCode won't complaint but my custom getters and setters won't be called. on the contrary if i use

@synthesize foo = _foo

Then XCode will never allow me to use foo. So I am not sure as to whether it is just some paranoid coding style or industry accepted standard. Kindly correct me if wrong. Thanks Again Kevin

/cc @nesquena @timothy1ee

Reply to this email directly or view it on GitHub: https://github.com/kevin36524/simpleTodos/issues/1#issuecomment-22635737

kevin36524 commented 11 years ago

Thanks sir, You are correct. It is actually _foo. /cc @nesquena @timothy1ee