zoukankan      html  css  js  c++  java
  • iphone点击空白隐藏键盘

    -(void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event{

         UITouch*touch =[touches anyObject];

         if(touch.phase==UITouchPhaseBegan){

             //find first response view

             for(UIView*view in[self.view subviews]){

                 if([view isFirstResponder]){

                     [view resignFirstResponder];

                     break;

                 }

             }

         }

    }

  • 相关阅读:
    053403
    053402
    053401
    053400
    053399
    053398
    053397
    053396
    053395
    第k小数
  • 原文地址:https://www.cnblogs.com/zzxap/p/2175648.html
Copyright © 2011-2022 走看看