问题
I want share my application iPad screen with other devices which are running the same application.
More detail: My application is a meeting application. Now I want that those who are the participants of that particular meeting can my screen when I share my application screen.
Conclusion: I want to share my app screen with other devices which have running the same app, JUST like Skype screen share.
回答1:
You will be needing a server for this. Its a long process. Briefing you with the overall details
- You get the information when users are loggedIn.
- User will try to send the image to the server first.
- Get the screenshots images continuously from the user screen.follow this link
- convert the image to NSData.
- From server detect the other user(to whom screen is to be shared.) send the data to that user. And convert the NSData into UIImage and update the UI accordingly.
Loop the process.
// for taking screen shot
UIGraphicsBeginImageContext(self.window.bounds.size); [self.window.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); NSData * data = UIImagePNGRepresentation(image); [data writeToFile:@"foo.png" atomically:YES];
回答2:
you can do this exchange the image stream(Current screen image context / Captured current screen)
for both device vice-versa.
Means transfer current context of your screen to connected device and make this process like continues sending/receiving like live stream of data.
Screen sharing working you get idea from following links.
1) Desktop sharing
2) Remote access of device
来源:https://stackoverflow.com/questions/13967252/screen-sharing-in-ios-app