UIWindowを取得する
-(UIWindow*)getWindow{
    UIWindow* window=[UIApplication sharedApplication].keyWindow;
    if(!window)window=[[UIApplication sharedApplication].windows objectAtIndex:0];
    return window;
}