what would be a good way to format this piece of code?
UIBarButtonItem *prev = [[UIBarButtonItem alloc] initWithTitle:@"Prev"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(setDateRangeClicked:)];
You can, of course, do whatever you want. I like lining up the colons:
UIBarButtonItem *prev;
prev = [[UIBarButtonItem alloc] initWithTitle:@"Prev"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(setDateRangeClicked:)];
I split up the declaration and the assignment just to get rid of the scroll bar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With