Google Plus One button to iPhone app - ios

I'd like to add a Google +1 button to an iOS app that takes a link as a parameter.
Is this possible?
Thanks

The recently launched Google+ API: http://developers.google.com/+/overview has Objective C support: http://developers.google.com/+/downloads

I would research Facebook Like button in iOS, as right now the solutions for using the +1 and the Like buttons inside of an iOS app are probably similar since the same thing is being done (using a website-centric tool inside of an iOS app.)
The following link describes a way to use a webview to implement the Like button, and I don't think it would be too hard to adapt it for the +1 button. Caveat is that there are some usability issues to overcome with the Login itself (with the FB version), although admittedly I don't know exactly how Google handles a user who isn't logged in when they click the +1.
http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html

The easiest way of showing the Google+1 button is, first download the google+ ios sdk and then include it in your xcode project. After the previous step now drag a button on to xib file. After that try to change the custom class of the button to GPPSignInButton (You can change the custom class of the button from the right hand side property window). Then in the .h file of controller create an IBOutlet of type GPPSignInButton and then from the file's owner assign that IBOutlet to the button dragged on xib.
Now whenever you will run the application you will se google+1 button on ur xib and through this button we can perform signIn activity.
Details
https://developers.google.com/+/mobile/ios/sign-in

Related

How to create a popup window in Xcode Swift?

I have an iOS info app. The main screen of the app consists of rows of icons. I want that after tap on certain icon card with information appears and background blurs. To close the card I need to swipe up or down. It is very similar to Instagram's imageviewer.
Please help me create that.
P.S. This is my first project so please keep this in mind when you going to describe the method.
It should look like this
The answer to your question is probably hidden beneath the layers of how you can segue between the scenes of a storyboard. First, you create a scene like this in the storyboard and use some third party libraries to present it as a 'pop-up'. It is not possible for you to do that natively as Apple has not added any segue style showing the scene like a pop-up on the iPhone screens (On iPad it's possible - check how Apple presents choose Wi-fi network in Settings). For that purpose, you can use BlurryModalSegue or CNPPopupController to perform such operations.
Thank You!

Xcode AMSlideMenu Opening Left menu only with a button, disabling swipe

This might sound like a weird request but I've been using the AMSlideMenu (which is fantastic) https://github.com/SocialObjects-Software/AMSlideMenu
But on one of my specific projects I need to be able to open the left side menu only using a button.
Now I have a button that's currently working to open and close the menu, but for this specific project I need to use swipe gestures, so I would need to disable accessing the menu via swipes.
I've been looking at the methods that are within the AMSlideMenu files, but I can't figure out how to disable the swiping.
Any help would be greatly appreciated!
If you've read the documentation in the link, you could notice they stated that you have to import "UIViewController+AMSlideMenu.h" on your pushed view controller and then call [self disableSlidePanGestureForLeftMenu]; on your viewDidLoad method (or wherever you want). I've tried it with the example they've provided and it works.
Update:
For iOS 8+ you should call this method on viewWillAppear and not viewDidLoad as mentioned here.

MapKit: How to create a custom annotation view with a button on a .xib file?

I'm using Xcode 5 and the latest iOS SDK and I'm having a really hard time figuring out how to create custom annotations with a clickable button.
All I need is a custom annotation with a button, that is shown when the user taps a pin on my MKMapView. Following some tutorials, I managed to create a custom class that loads a .xib file, this already works. However, the problem is, that whenever I try to click a button placed on the annotation view, the pin gets deselected. I would love to be able to design my annotation in a .xib file and not create it 100% programmatically. Is there any way of doing so?
Thanks,
Niclas
There is a great tutorial on maps on a site I used when I first got started into this section of iOS. It can be found here: http://www.raywenderlich.com/21365/introduction-to-mapkit-in-ios-6-tutorial ( Just an FYI, this is a great resource for learning more about iOS. )
Anyways, this paragraph should sound familiar (as to what you're after):
You’ve now made it so that in the callout when a pin is tapped on, there will be a button on the right hand side. When this is tapped, the mapView:annotationView:calloutAccessoryControlTapped: method is called. In this method, you grab the MyLocation object that this tap refers to and then launch the Maps app by calling the openInMapsWithLaunchOptions: method.
Just note that it is opening up the Maps app, but you can choose to do whatever you want really.
Later on, here are some other great links if you need them:
http://www.raywenderlich.com - This is where I started, recommend you do the same. Use their search box. They sell some privatized/self-published PDF books too if you like that.
http://www.cocoacontrols.com - You could probably find a control someone has already written with maps.. use the search, filter for iOS only.
http://www.nshipster.com - Great building block site
http://objc.io - Great site for getting into more low-level development.

Facebook like button in iPhone native application

This question seem duplicate but problem is that other question are old or not giving answer as my need.
What I have done:
I have integrated facebook for iOS 5 and iOS 6 both and it is sharing on wall properly.
Problem
My application have a UIButton "LIKE" to like my application page on facebook.
I want that if user click on this button he should be able to like that page.
I have search for hours but not able to get any proper solution.
For iOS 6 I get following link of apple iOS 6 site
iOS 6 with facebook
Here in third segment it show an image where app page is open in UIViewController with facebook like button.
and it said that we can open it without leaving our app.
I search but don't find how to open this page in UIViewController as we open dialog for share.
Ask me if you need more information.
Happy to get any kind of help or information.
As far as I know, the app shown by Apple with the Like button integrated (i.e. the App Store) is using a webview to display its content. This button is not something you get from a native code. The reason is that Facebook don't wan't to get Like actions without a user action to trigger it (I heard that from a Facebook guy at the App Day 2012 conference in Paris). And the only way to ensure that is to encapsulate and hide that in an HTML component.
What I would suggest is to instantiate a small webview displaying a page containing only the Like button of the desired page. Let us know if it work! ;-)
Mathieu is right, there is no way you can do that with a normal UIButton.
You have to use an iFrame (loaded in a UIWebView) if you want the button to like the page immediately. I did not like this approach as it takes some time for the iFrame to load.
More information can be found here: http://www.raywenderlich.com/1626/how-to-post-to-a-users-wall-upload-photos-and-add-a-like-button-from-your-iphone-app
I ended up having a UIButton that opens the Facebook page in Facebook.app or Safari.app. The user has to press the like button manually.
It's just allowed for testing purposes and iOS only.
check this out
https://developers.facebook.com/docs/ios/like-button/

Are there any other iOS system sounds available other than 'tock'?

I have implemented an alternative keyboard on my first iPhone app. I would like to play a sound when a button is pressed. The default click sound when the standard keyboard is pressed would be fine, but I don't know how to get that sound.
In this answer I found how to play a 'tock' sound:
Playing system sound without importing your own
I got this to work easily enough but it is a very loud sound. I've searched Stack Overflow and the Xcode help for available iOS system sounds other than 'tock' and I can't find them.
Are there other built-in sounds, maybe even the default keyboard sound, that I can use?
Prior to, and since posting this question almost 2 weeks ago I have searched high and low for a method to make the keyboard click sound work in my app. I have attempted to implement and understand Apple's documentation on custom input views. I butchered my app in many ways attempting to make it work and created several test projects. I tried to interpret how to do this from various other sources on the web. All to no avail. I have finished my app all but for this last function.
I finally hit on a simple answer towards the end of this IPhone Dev SDK form question/post. The ultimate answer is easy and can be done in a few seconds with these easy steps.
Link the 'AudioToolbox.framework' to your project (Click on your project's Target, select 'Build Phases' and under the 'Link Binary with Libraries' item click the + button and add the framework.
Add the following to the header file of the class where you want to implement the click:
#import <AudioToolbox/AudioToolbox.h>
Add the following line of code in the implementation file of your class wherever you want the keyboard click sound to appear:
AudioServicesPlaySystemSound(0x450);
THAT'S IT! AND IT WORKED!!! HALLELUJAH!
According to Paul in the other forum this has the following downside:
"keyboard keys won't be affected by the iOS user preference for keyboard sound on/off."
But when I turn the volume up or down on my iPhone or if I mute the iPhone, the keyboard click sounds do go up and down or are muted as would be expected. Given that I found it impossible to implement keyboard clicks "UIInputViewAudioFeedback" as documented, I'm happy to have anything work.
P.S. If anyone has a link to an actual project that I can download, build and run on my iPhone to see EXACTLY how to properly implement: "UIInputViewAudioFeedback" I'd be happy to give it a look. But so far I've found none, nor any step-by-step newbie style instructions on how to make it work.
[Sept 30, 2012 UPDATE:] I'm happy to say that my app was accepted into the app store using this method. Here it is: https://itunes.apple.com/app/fine-tip-tip-calculator/id563429225
...Dale
Try UIDevice's playInputClick:
[[UIDevice currentDevice] playInputClick];
From the documentation:
Use this method to play the standard system keyboard click in response to a user tapping in a custom input or keyboard accessory view. A click plays only if the user has enabled keyboard clicks in Settings > Sounds, and only if the input view is itself enabled and visible.
Make sure you adopt the UIInputViewAudioFeedback protocol in your input view class, and implement the enableInputClicksWhenVisible delegate method to return YES, as per the documentation.
EDIT - For implementation of delegate methods, check out Apple's documentation on custom input views.

Resources