"Spotify like" dragging bottom player in swift - ios

I would like to have a bar/button at the bottom of my screen that behaves like the mini player bar on Spotify. If I click on it, a view appears from the bottom. If I drag it, I can play with it and make it go up and down. And if I release it, it continues up by itself.
I checked that question: How to animate an object vertically with touch like Spotify's music player does when tapping the song, but it only resizes an (image) view where I want to put a new ViewController (and I cannot drag it, only click it).
I found a project that does that: https://github.com/andriirogulin/ARSlidingPanel and it looks like it works pretty well. It is really something like that that I want to achieve.
My problem is that I have almost no knowledge of objective-C. Moreover I tried to follow the Integration tutorial and I cannot add a custom segue from ARSPContainerController. I need to drague it from an object, and there is none in the sample project. Therefore I would like to know if:
there is a name for this kind of specific bottom bar (for easier research purposes) and the way I would like to use it.
there is a Pod/project that does that in swift.
someone has a sample project that has this behaviour?

Isn't it very close to what Apple Music is doing? If so, you might be able to use this: https://github.com/xxxAIRINxxx/MusicPlayerTransition

Related

iOS animation flip book cover and ease up

I have a scroll view, and few buttons/images there. on clicking I would like such animation :
(image opens like )book cover opens, and related view controller opens with ease in animation and gets full screen.
Any thoughts ?
Something similar happening in cook app
Link of cook app : https://itunes.apple.com/us/app/cook/id687560846?mt=8
Edit : I have added animation, gif will run uninterrupted once completely loaded.
Might I suggest iBooksOpen, a library that provides a book opening animation. It's pretty lightweight and should meet your needs.
(Only drawback: it opens a single page to the whole screen, but you could adapt the geometry if you wanted a page-folding-open effect.)

How do I animate a view on touch?

My scenario is common I think. I want to animate a focus reticle (just like Apple's default app and some of the other camera apps out there). Is this all done in drawRect:? Or can I use the animation framework right from the touch handler?
Following some of the examples around github (and the internet) I went ahead and just subclassed UIView (drawRect:) and a little simplistic "animateWithDuration:".

How can i stack up tiles in iOS programming?

I'm trying to learn iOS programming and I decided to make a game like Connect 4, or some may know it as Four in a row.
I've done the grid and dropping the tiles. However, I haven't been able to stack the tiles on top of each other. I havent tried that much because I have no idea on how i could do something like that as i have never tried making a game like this, I have also searched online but I dont know if it's my choice of wording that it never shows anything or if there isnt anything like it.
I have 7 column on the top, with a hairline where you touch in order to drop the tile to the grid. Right now the tiles just stack on each other.
Not sure if my response is worth to be an answer but what the heck...
If you are set on not getting into Sprite Kit right now, you could probably use UIButton to make this happen. Divide your screen into a grid of UIButtons. You can set the button images according to empty and played (red or blue). Each button code would have to check for things like if the hole (button) was already played, what color chip to display, is this a winning move, etc... There is of course an easier way to do this instead of copying the same code into each button but I'll let you try to figure that one out for now.

Adding custom button to MPMoviePlayerController (fullscreen)

I have a MPMoviePlayerController instance in my iOS app, that plays a local file in fullscreen mode. This all works fine, but now I want to add a custom button to the window for changing the playback speed. We support both iPhone and iPad in all orientations.
I know how to set the playback speed from code (using setCurrentPlaybackRate), but I need to let the user do it while watching the video, which means adding some kind of button to the playback screen next to the existing buttons, e.g. next to "play", "pause", or in the top bar.
By looking on StackOverflow I have found various replies for questions similar but not quite the same, some saying it cannot be done in fullscreen, some saying it can be done (but is very complex) by creating some kind of overlay, effectively replacing the entire overlay with a custom one.
Although, I have yet to find any code examples (apart from a few snippets without context), getting-started style tutorial or similar for this, so any pointers to example code would be greatly appreciated.
maybe this Apple example could help you
https://developer.apple.com/library/ios/samplecode/MoviePlayer_iPhone/Introduction/Intro.html

iOS: Facebook chat heads behaviour and animations

This question is probably a little out of date, but I've been using the new Facebook for iOS with the "chat heads" feature (with the chat heads only present within the app), and was wondering how Facebook went about implementing this? E.g. How did they handle the drag animations for the chat heads, and also (when clicking on the chat head) how did they manage to overlay a UITableView on top of the "base" UIViews in the background?
Is this all part of UIKit, or did they create their own classes to handle this?
To answer #StuartM's question in the comments, in the last couple of months I've had a bit more experience with UIKit, and I think I have a rough idea on how I would implement something like this if I was going to do it.
What I would do is for the chat head, create a styled UIButton and add it as subview to the main Window. For the dragging, I would add a Gesture Recognizer to the UIButton to respond to the drags, and for the "snapping to edges" I would use iOS 7's new UIKit Dynamics (http://www.raywenderlich.com/50197/uikit-dynamics-tutorial).
As for showing the UITableView overlay with the chat history, I would use a Child View Controller (https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html#//apple_ref/doc/uid/TP40007457-CH18-SW6) and as for the popping open animation, I would just use the default UIView animations, maybe using animation transactions as I'm not sure I can do everything with just the implicit animations?
And I think that should be it. To be honest, I think anyone who has a handle on those frameworks should be able to build anything in their iOS apps, and if you were to create a "chat heads" like sample project in your spare time, should give you a pretty indepth knowledge of how those frameworks work.

Resources