ios - How to programmatically take a screenshot and share it to a social network? -
i attempting programmatically take screenshot , share social media network when button clicked, however, cannot quite figure out how so. appreciate
-(void)touchesbegan:(nsset *)touches withevent:(uievent *)event { /* called when touch begins */ uitouch *touch = [touches anyobject]; cgpoint location = [touch locationinnode:self]; sknode *node = [self nodeatpoint:location]; if ([node.name isequaltostring:@"twitter"]){ [self.button play]; twitter = [[slcomposeviewcontroller alloc] init]; twitter = [slcomposeviewcontroller composeviewcontrollerforservicetype:slservicetypetwitter]; [twitter setinitialtext:@""]; uiviewcontroller *twit = self.view.window.rootviewcontroller; [twit presentviewcontroller: twitter animated: yes completion:null]; } }
Comments
Post a Comment