Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. typedef struct{
  2. char* title;
  3. char* message;
  4. } AlertViewData;
  5. void displayAlertView(void *paramContext){
  6.  
  7. }
  8. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
  9. dispatch_queue_t mainQueue = dispatch_get_main_queue();
  10. AlertViewData* context = (AlertViewData*)malloc(sizeof(AlertViewData));
  11. if(context!=nullptr){
  12. context->title = "test";
  13. context->message = "Hello";
  14. dispatch_async_f(mainQueue, context, displayAlertView);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement