github.com/c-darwin/mobile@v0.0.0-20160313183840-ff625c46f7c9/example/basic4/main.go (about)

     1  package main
     2  
     3  import (
     4      "github.com/c-darwin/mobile/app"
     5  )
     6  
     7  /*
     8  #cgo CFLAGS: -x objective-c
     9  #cgo LDFLAGS: -framework Foundation -framework GLKit -framework UIKit
    10  #import <UIKit/UIKit.h>
    11  #import <Foundation/Foundation.h>
    12  #import <GLKit/GLKit.h>
    13  
    14  void ShowMessX(void) {
    15          NSLog(@"ShowMessX<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
    16  
    17  	UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"1111111111111" message:@"Это простой UIAlertView, он просто показывает сообщение" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
    18  	[alert show];
    19  	[alert release];
    20  }
    21  
    22  
    23  */
    24  import "C"
    25  
    26  func main() {
    27  //     go func() {
    28  //       C.ShowMessX();
    29  //     }()
    30  
    31          app.Main(func(a app.App) {
    32                  for _ = range a.Events() {
    33  
    34                  }
    35          })
    36  }
    37  
    38