我想在我的应用程序中添加google-plus属性的共享.我在google web console上注册了客户端应用程序并获得了客户端ID.
在我的viewDidLoad函数中:
- (void)viewDidLoad{
CGRect rect = self.view.bounds;
rect.size.height = rect.size.height - 50;
_postContentUIWV = [[UIWebView alloc] initWithFrame:rect];
[_postContentUIWV loadHTMLString:selectedPostCD.content baseURL:nil];
[self.view addSubview:_postContentUIWV];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
// signIn.shouldFetchGoogleUserEmail = YES; // Uncomment to get the user's email
// You previously set kClientId in the "Initialize the Google+ client" step
signIn.clientID = kClientID;
[GPPSignIn sharedInstance].actions = [NSArray arrayWithObjects:
@"http://schemas.google.com/AddActivity",
@"http://schemas.google.com/BuyActivity",
@"http://schemas.google.com/CheckInActivity",
@"http://schemas.google.com/CommentActivity",
@"http://schemas.google.com/CreateActivity",
@"http://schemas.google.com/ListenActivity",
@"http://schemas.google.com/ReserveActivity",
@"http://schemas.google.com/ReviewActivity",
nil];
// Uncomment one …Run Code Online (Sandbox Code Playgroud) 我在用 :
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(dismissKeyboard:)];
[self.view addGestureRecognizer:tap];
Run Code Online (Sandbox Code Playgroud)
从其他任何地方点击时关闭键盘UITextField.
但是在我看来,我有UITableView,我必须检测点击UITableView的行.因为UITapGestureRecognizer我的didSelectRowAtIndexPath功能没有调用.有没有办法检测点击的对象是否是UITableViewCell?