I'm using C++ Builder for Application programming. I want to know how to open an URL on an Ios Device in Safari ( simply on an button click ) . Would be nice if anyone has an answer to that.
You could do
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://www.google.com"]];
For further details Check UIApplication Class Reference
Related
I am working on an app using cocos2d-x v2.2.3 for iOS (in C++) and currently trying to hide the status bar when the splash screen is being shown.
I have:
1) Added "View controller-based status bar appearance" -> NO to ios/Info.plist
2) Added setStatusBarHidden code to rootviewController (http://www.cocos2d-x.org/forums/6/topics/29675)
but none of them seem to work. Any ideas as to how I can get this to work? Currently using Xcode 5.1
Set YES for this key in info.plist "UIStatusBarHidden"
If you want to hide or unhide after also then you have to follow bit different procedure for iOS 7
Try This one It will Run perfectly..
[[UIApplication sharedApplication] setStatusBarHidden:YES];
And in XIB set none option for the status bar.
Reference: Hide the status bar on iPhone on a single view?
I have requirement to open HTML content on iOS application. Currently I am using Qt for iOS which does not have support for QtWebKitsWidgets. So now I am planning to open UIWebView using UIViewController of iOS from Qt application. I have tried to open UIViewController from dummy UIViewController using presentViewController method but it is not opening anything on QMainWindow.
Let me know whether such thing is possible or not. If possible then guide me through some suggestions. Let me know if more detail is required. I am modifying example given by Qt for iOS only. Note that I am using Qt5.2.0 for iOS.
The Qt documentation points to this example of how to integrate a native iOS controller with a QML application.
https://github.com/richardmg/qtdd13_qmlapp
It implements bringing up UIImagePickerController over a QML display.
So, while you can't integrate a UIWebView with QML content, you can push a new controller on containing it or maybe even can super-impose a UIWebView on top of the QML view.
It’s possible (with the Qt4iOS iOS plugin) to use UIWebView from QWidget based apps, but not QML apps. The Digia iOS plugin does not support using UIWebView in any way (and won’t any time soon).
I'm a C++/Windows developer getting to grips with iOS AND OBJ-C... can anyone provide sample code how I could iterate through all windows/views belonging to my application and log/print to the debugger some vital information about the size, position, state, etc of each. I'm using a 3rd-party library and am not really understanding exactly what it is creating on my behalf.
In the debugger, you can try:
po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]
Try this:
po [[UIApplication sharedApplication] windows]
I have an app on iOS that works with C++ (a Cocos2DX game). I want to integrate Facebook on it.
I initialize the Facebook iOS SDK as the Facebook developers website indicates it, on a Objective C class. Then I call this Objective-C class from my C++ code, and it seems to work -the Facebook app is opened and asks for authentication and permissions-.
The problem is that the "events" or "callbacks" like fbDidLogin are not called back, or at least I do not have control over them from C++
Do you know if that can be done?
Thks.
Ok, the solution:
All the Facebook related code must be in the AppDelegate.m Then you can access it from anywhere in your code with this instruction:
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate FacebookLogin];
My App is written in OpenGL and C++, I do not use XIB file for presentation. So how can I create an href link that the user clicks and takes them someone in the browser?
OpenGL only draws things to the screen. There's no concept of geometric objects. So you'll have to detect a click on the link text and call the appropriate iOS API invoking the URL.
Okay I think I found it:
NSURL *url = [NSURL URLWithString:#"http://www.iphonedevelopertips.com"];
[[UIApplication sharedApplication] openURL:url];