Try setting the background color of the navigationBar to red and you can see that it's somehow smaller than the screen even though the self.navigationBar.frame.size.width is the same as the width of the screen.
Anyway, I set my navigationView to be a subview of the navigationBar and I didn't have the X_OFFSET issue. The X_OFFSET issue gets really annoying when I run the app on different devices on fullscreen mode instead of scalemode. Couldn't figure out an easy solution so I just did this:
navigationBar.addSubview(navigationView)
I have a version of this in Objective-C using your code base. If you want me to put that up too for others who are still using Objective-C, let me know!
yes can u upload the obj-c version - When I run you test it shows the app running in the middle of the screen with about a cm on the top and bottom (iphone6) of empty space - how to fix that ?
Hey @cwRichardKim
Thanks for creating and sharing this!!!
I was able to port it into Swift with behavior that is more like Tinder located at:
https://github.com/jonathanxie/JXSwipeBetweenViews/blob/master/README.md
Might be a bit buggy but it works decently well...
Also, for the X_OFFSET issue, I noticed that it appears if you set the navigationView to the titleView of the navigationBar:
Try setting the background color of the navigationBar to red and you can see that it's somehow smaller than the screen even though the self.navigationBar.frame.size.width is the same as the width of the screen.
Anyway, I set my navigationView to be a subview of the navigationBar and I didn't have the X_OFFSET issue. The X_OFFSET issue gets really annoying when I run the app on different devices on fullscreen mode instead of scalemode. Couldn't figure out an easy solution so I just did this:
I have a version of this in Objective-C using your code base. If you want me to put that up too for others who are still using Objective-C, let me know!
Hope this helps others out!