I want to know if there is any android "OnUserInteraction" equvalent in iOS. I want to implement session logout functionality so I need to know any equvalent functionality fo OnUserInteraction.
In iOS you can subclass UIApplication and override SendEvent as outlined here.
Related
In Android, app can change webview's url with "javascript:alert(123);",
then webview will alert 123.
I want to know is it can work in ios app ?
Yes.
Use this function stringByEvaluatingJavaScriptFromString. Read more about this function at UIWebView class reference
[webView stringByEvaluatingJavaScriptFromString:#"alert('123');"];
Hope this is what you are looking for.
P.S.: Use this function once webViewDidFinishLoad is called.
Yes.
Here is a great article: True JavaScript+UIWebView integration in iOS7 - http://blog.impathic.com/post/64171814244/true-javascript-uiwebview-integration-in-ios7
Hello I'm implementing different ways in my project to share some TEXT to other Chat Applications, such as: Whatsapp, Line and WeChat.
I have no problem to implement this UIActivity subclass using following libs:
Whatsapp (https://github.com/jberlana/JBWhatsAppActivity)
Line (https://github.com/OopsMouse/LINEActivity)
WeChat (https://github.com/iDay/WeixinActivity)
I realise all these Apps has internal URI protocol to communicate with them from my application:
whatsapp://send?text=SAMPLE_TEXT
line://msg/text/SAMPLE_TEXT
Anyone knows the way to connect to Facebook Messenger iPhone App to share some text, at least?
I guess you're looking for this answer - not sure whether it's official API by facebook - couldn't find any docs on it.
I saw this MacStories article about some apps adding keyboard shortcuts to iOS7 apps. How is this implemented? Is it a private API that I shouldn't be using?
I've done some searching around the iOS developer library on http://developer.apple.com, but I couldn't find anything.
There's already a SO question for this. See this answer and this blog post for details.
Basically, there is a new keyCommands property on the UIResponder class in iOS7. Override the getter to return an array of UIKeyCommands.
Hat tip to Сергей Малетин for the comment.
How can I check all the methods that were deprecated since iOS 4.3? Is there a website, that shows or filters all the methods that are deprecated in a give particular iOS?
The best place is to check in Apple Class Reference. Ex. for NSString.
This will be updated by them after every modification, and will be almost accurate and uptodate as compared to all other website, which in turn will get the information from here only.
if ([object respondsToSelector:#selector(methodName)])
{
// do something
}
I would like to know whether it is possible to add a Facebook Like button to a native iPhone app. In the app, the user browses a business directory or deals. When they tap on an item to view the details, it would be nice to have a Facebook Like button that can be used to post the item to the user's Facebook page.
Facebook writes: "Currently, the Like button is only available in mobile web apps".
My app is a native app and not a web app, so therefore I assume it's not possible. However, I do assume that it is possible to mix native UI components on a screen along with web components and therefore it might be possible to implement the Like button, although I am not sure how you pass data from the native portion to the web portion.
If the only solution is a hack, then I won't implement it because at some point the hack will fail when Facebook alters their API.
read around SO a little, you get many leads. Here's one:
Like button in iOS application
And a comment points to github.com/brow/FacebookLikeView
It has same caveats, but it seems there aren't any magic solutions.
There are these blogposts as well:
http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html
http://petersteinberger.com/2010/06/add-facebook-like-button-with-facebook-connect-iphone-sdk/
But not sure you get a native UIButton. Maybe you can open a webview in the background and emulate a click on it...
GL, update if you have some findings,
Oded.
Now you can use the FBlike button using the following code but it need to download latest sdk and it is the beta version :(
Here is the code:
[FBSettings enableBetaFeature:FBBetaFeaturesLikeButton];
[FBSettings enablePlatformCompatibility:NO];
FBLikeControl *like = [[FBLikeControl alloc] init];
like.objectID = #"http://shareitexampleapp.parseapp.com/photo1/";
like.likeControlHorizontalAlignment=FBLikeControlHorizontalAlignmentRight;
like.likeControlStyle=FBLikeControlStyleBoxCount;
[self.view addSubview like];
It looks like Facebook finally decided to allow this, more directly, via the Open Graph API.
See documentation here
Check this out, FB just made it possible through their SDK. Only for testing and ios for now
https://developers.facebook.com/docs/ios/like-button/