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.
Related
I am dealing with a weird bug on Ionic's iOS native build where I sometimes cannot swipe back or switch tabs once I transition to a new page using router.navigateByURL(...), and trying to debug this issue has been troublesome since I can't "see" how the gestures are handled. Does anyone know where I should be looking in the code for handling transition gestures?
Here's a video demo of the problem: https://streamable.com/hk9c0
In the video, you can see me:
Swiping down to refresh using the ion-refresher element and you can see the page beneath (already entered a bug report for that part: https://github.com/ionic-team/ionic/issues/18284 )
Trying to tap the back arrow in the left corner
Attempting to swipe left to right to go back a page (hard to show that one)
Tapping the bottom tabs to transition to new tab, at one point, I tap on a tab that has an ion-fab element which appears in the bottom right because its z-index is higher than the "stuck" page.
Currently the best I've been able to do is by looking at the css classes that are added to the pages, but it's not much use....
Where app-release is the page you can see in the video and app-home is the page underneath the stack. It's my understanding that Ionic uses hammer.jsfor gestures, so I added it as a tag, please correct me if I am wrong. I cannot, for the life of me, recreate this bug consistently, but will often trigger 1 out of 50 tries.
I've been digging through the utils in Ionic Core to see where elements are being added and removed, with no luck.
I created a bug request for this here as well: https://github.com/ionic-team/ionic/issues/18305
Are you using #angular/animations to make the transitions between the pages? I had some issues like yours, as you can see in my question.
Router navigate on Ionic with animation blinking on ios using angular animations
If I am right about the use of #angualar/animations I suggest to use a custom animation of the Ionic itself, and not te angular's. You can see an working example here of its use here:
https://github.com/mhartington/ionic4-custom-animation
Since I have less tem 50 rep I cant comment so I had to post this anwser not knowing if it was really your case. Hope it helps.
Before iOS 9 was released, I've developed an app targeting iOS 8.4. I've used some UITableView connected each other via segue of kind "Show (e.g. Push)". It worked perfectly with the right behavior: every time I switched from a UITableView to another, the back button appeared, so the user is able to turn back to the previous scene; the back button appeared also from UITableView to UIViewController, using the same kind of segue. Now I have upgraded to the latest version of Xcode and targeting the app to iOS 9.0, I got this problem: now, if I go from UITableView to another UITableView, the back button doesn't appear anymore, but if I go from UITableView to UIViewController, the back button appears. I've seen other developers has had a similar problem (as you can see here, here and here), but I don't understand how they have solved (except for the third link, but it's not my case). Anyone knows how can I get back button working again? Thanks in advance
It looks like the guy who posted the second link is having the same problem as you. In a comment he said that the way he fixed it was getting rid of the extra navigation controllers:
No need put the navigation controller for each view. put the navigation controller start view only.
So that is what I would suggest doing. Only put a navigation controller on the first view controller. Get rid of all the others.
So, thanks to Caleb's and ogres' suggestions, I solved my problem in this way as you can see in this screenshot, I hope it helps anyone who will have the same problem!
If you have two UITableViews and you want connect them to each other, you just need one NavigationController.
I'm new into ios development. I'm trying to implement a small contact manager application. I'm following a tutorial from this link http://www.kaleidosblog.com/swift-side-menu-tutorial-how-to-create-a-custom-side-menu-in-ios and I followed many, but which didn't satisfy my requirements. What I'm trying to achieve is having a sidebar menu, and have a table view as my main view. Most of the examples showed how to use them with a normal view controller. A clear example is how BBM works on iphone, when you tap more or the sidebar button. From the provided link, is there anywhere to change the initial view to table view? I've tried but it wasn't successful. I'll appreciate any help, My application as to be submitted soon. Thanks.
You can use this link for side bar menu using UITablView
http://www.appcoda.com/sidebar-menu-swift/
I've created an iOS share extension with a custom UI (not using SLComposeServiceViewController) and everything works great.
Once the extension is invoked, it takes a shared URL or text and sends it. That's all it does and it works well.
The custom UI is simple. One image view that shows a graphic indicating that it is sending and then that changes to say "Sent" once done. Then this fades out.
What is going wrong is after this is done, the extension seems to disappear, but I can't control the host application anymore. It's as if an invisible window or view is on top of everything. (For example, an image rotator in Safari still rotates, but I can't scroll or tap links or buttons, etc.)
I'm calling [self.extensionContext completeRequestReturningItems:nil completionHandler:nil]; once the share is done, and as I understand it, that should dismiss my UI. I've also tried [self.view removeFromSuperview] without any luck.
Happens on Simulator and Device. Is there something I'm missing?
Edit: This is what the view hierarchy of a simple app I built to test sharing looks like in Reveal before and after sharing. The app has two buttons: share text and share url, each of which bring up a standard share sheet.
Before
http://joshh.is/1utYnKS
After
http://joshh.is/1rdVo34
Ok, I don't know why it took me 10 hours to realize that I was not including a call to super inside of my beginRequestWithExtensionContext: method.
I don't know what other problems that caused, but it certainly caused my problem above.
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