« first day (1157 days earlier)      last day (999 days later) » 

user457812
00:37
I now have 150 octocat stickers.
04:08
oh hey nil
i just came to say
 
6 hours later…
10:34
Mhmdng. Why doesn't my workaround do what I want!??
I've made a UIView subclass with a StyleKit draw method, and I import and add it as a subview to other UI components. Yet it doesn't show.
In fact, no UIView I add seems to appear. Weird.
Well, found the issue..
 
5 hours later…
15:14
You know what I'd like for StackOverflow, a 'Save' button so that I can easily store answers or questions I like. Is there a feature that does this besides Favoriting the question that I don't know of?
15:59
I have no octocat stickers, nor do I have any Stack Overflow stickers either.
Hi! I can't figure out how to initialize this block: void (^actionHandler)(LGActionSheet *actionSheet, NSString *title, NSUInteger index) Any help?
what do you mean by "initialize"? You're passing in an action sheet, a title and an index.
right?
and what does "^actionHandler" look like?
I'm trying to implement it with [the block] = ^{};
pretty new to blocks
blocks aren't the easiest thing to figure out. What is the compiler complaining about?
Yup, struggling with the syntax.. void (^actionHandler)(LGActionSheet actionSheet, NSString *title, NSUInteger index) = / What should I write here? /^{ / Want to do something cool here */ };
16:07
does it return anything?
Doesn't compile "Incompatible block pointer types initializing [...]".
show me the definition of "^actionHandler", if you can find it.
Sure thing! thanks
It is defined as a property: @property (strong, nonatomic) void (^actionHandler)(LGActionSheet *actionSheet, NSString *title, NSUInteger index);
..And then used in initialization of the LGActionSheet:
- (instancetype)initWithTitle:(NSString *)title
buttonTitles:(NSArray *)buttonTitles
cancelButtonTitle:(NSString *)cancelButtonTitle
destructiveButtonTitle:(NSString *)destructiveButtonTitle
actionHandler:(void(^)(LGActionSheet *actionSheet, NSString *title, NSUInteger index))actionHandler
cancelHandler:(void(^)(LGActionSheet *actionSheet, BOOL onButton))cancelHandler
destructiveHandler:(void(^)(LGActionSheet *actionSheet))destructiveHandler;
okay
try this:
I want to pass in my custom implementation of the actionHandler
16:14
void (^actionHandler)(LGActionSheet *, NSString *, NSUInteger) = ^(LGActionSheet *actionSheet, NSString *title, NSUInteger index) {

    NSLog(@"actionHandler being called with title %@ & index %d", title, index);

}
to the initializer
thanks a lot! will try at once
perfect! worked like a charm..
when I added closing ;
Need to read up on basic block syntax, I guess.. once again, thanks
no worries... I get dinged fairly often at job interviews on blocks & block syntax. And with Swift + Closures, it's the same deal.
 
5 hours later…
user457812
20:55
@borrrden I'm afraid my beard is currently much better than his.
user457812
Block syntax is easy if you just remember C function pointer syntax. It's basically that but with carets.
user457812
The exception is when you use it as a value, then the return type follows the caret.
23:07
Another one for the naughty list I guess ^
@nil Rats!
user457812
My beard is 100% laziness and it just blossoms out into lumberjack status.
As a reminder about block syntax -> fuckingblocksyntax.com
Xcode's feeling a little blue today. Flagging stuff in my comments :(
Leave me alone.
Oh, for crying out loud. Another ******* design problem.
F*ck you PaintCode.
Let me try this workaround.
Got to stick to the theme: I am never wrong

« first day (1157 days earlier)      last day (999 days later) »