         AuthSw.addTarget(self, action: "onClickMySwicth:", forControlEvents: UIControlEvents.ValueChanged)
         NameSw.addTarget(self, action: "onClickMySwicth:", forControlEvents: UIControlEvents.ValueChanged)
         TestModeSw.addTarget(self, action: "onClickMySwicth:", forControlEvents: UIControlEvents.ValueChanged)
+        
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyboardWillShow:"), name:UIKeyboardWillShowNotification, object: nil);
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyboardWillHide:"), name:UIKeyboardWillHideNotification, object: nil);
         
         let str = "http://gae.cavelis.net/user/\(self.Api.auth_user)"
         let url:NSURL! = NSURL(

    @IBOutlet weak var titleText: UITextField!
    @IBOutlet weak var detailText: UITextView!
    @IBOutlet weak var tagText: UITextField!
    @IBOutlet weak var ComIDSw: UISwitch!
    @IBOutlet weak var AuthSw: UISwitch!
    @IBOutlet weak var NameSw: UISwitch!
    @IBOutlet weak var TestModeSw: UISwitch!
    @IBOutlet weak var genreTable: UITableView!
    @IBOutlet weak var thubmTable: UITableView!
    @IBOutlet weak var scrollview: UIScrollView!
    
    let Api = CaveAPI()

    var Name:Bool  = false
    var Anony:Bool = false
    var TestMode:Bool = false
    var txtActiveField = UITextField()
    
    let genre:[String]=["配信ジャンルを選択","FPS",
        "MMO","MOBA",
