Creating a UIButton that changes with my repopulating UICollectionView Carousel, also adding in gifs to replace current images - ios

So Im pretty new to the swift language and not well versed in its structure, However I have managed to design a collection view to scroll horizontally through repopulating images. Ideally what I would like to do is be able to select that image and bring it to another screen to proceed with the application. I know I need to repopulate the button each time we repopulate the collection cell, however being novice I am currently failing at doing so. Any suggestions to make this work would be fantastic. Also any directions into incorporating gifs into the collection view instead of an image would also be appreciated.

Related

How to recreate this iOS application view and animations?

I am new to iOS development and unable to identify how Google/YouTube built this view in the YouTubeTV app. Is this built using an UITableView?
Essentially, the top row is selectable (Pre-animation). As you scroll up, the top row gets pushed up and out of view (Mid-animation), while the second row fades and grows into, and replaces, the top row). I've included screenshots of the animation in-progress. Thanks for the info and assistance.
This would be done with a UITableView or a UICollectionView. What you would do is enable paging on the Table/Collection view, so that it only ever displays entire cells in the visible area of the view. You can then manipulate the height use the heightForCellAtIndexPath: function - as an example of how it could be done on a tableview.
There is actually a really good example on github - typically we try to give more full answers on SO, but in this case, this could be relevant to you just starting out. Not affiliated in anyway, but it's a really good example.
https://github.com/aslanyanhaik/youtube-iOS

Multiple Photos in slideshow type display within viewController?

I am new to Xcode (started a few days ago).
I'm trying to find a way to get a few photos or videos in a display where the user can scroll or tap through as they desire. There will be multiple viewControllers each with a different set of photos.
Is there any existing UI type data types I can just drag and drop to make this work? Or is this out of range of the capabilities for someone not using code specifically.
I know Java, C, C++, MATLAB, etc. but never have toyed with Objective-C until now. Point being, I should be able to follow any logic you can throw at me, but I'm unfamiliar with the GUI and layout of Xcode as a whole.
This is what I currently have.
This is what I want. Perhaps with functionality to tap to full screen the image or swipe to go to another image. (This image was made with photosop. I don't actually have the picture file in Xcode because I don't know how)
SOLVED: Placed desired images in "Supporting files" content folder inside Xcode. This allowed me to select which photo I want displayed in which ImageView. To fix the proportionality issue where photos in Simulator are far too large, I simply added height and width constraints along with some other centering aspects and got the desired result.
Add UICollectionView in your view and set flow of collection view is horizontal make cell size that you want to keep.
Take a look at UICollectionViewController where you can display multiple cells with embedded views for your images, and consider segueing between them via a UINavigationController.
Edit: Now that you've added screenshots, I'd recommend using a UICollectionView embedded on your subclass of a UIViewController instead of a UICollectionViewController. This should give you more flexibility.

Best practice add multiple object at one page on storyboard

I am wondering what is the best practice for creating a page in storyboard that consist of multiple object (It can be imageView, View, label, etc). Look at this image, I feel ridiculous adding new object under the bottom view that is outside the page view.
I know a little how to arrange view with relativeLayout etc in Android. But how can I arrange this page with storyboard and autolayout? I want to arrange a page that consist of multiple object with different size. This maybe a stupid question, but I mean it a lot for me as a newbie developer. Thank you.
Its hard to say without knowing more about what you are trying to do.
It looks to me like it might be a good candidate for using a UITableView. You'd create a table view and add cells for each of the items that you want.
You could also create a scroll view and install the items on the scroll view, either through custom code, or with AutoLayout if there are a fixed number of items.
You could also use a UICollectionView if you need a layout other than a vertical scrolling list of items.
Edit your question with more details on what you're trying to do if you want more specific help.

Is there any way to make a custom table view cell look like a button in Xcode 6+?

I'm trying to create a Table View Cell array and have the name displayed in each table. The tables will look like what you see on the home screen of the Evernote app (shortcut, tags, places, notebooks etc.) and each one will access the next screen when tapped. How do I go about doing this? Novice app developer.
This is an image of the result I'm trying to get.
That is a basic cell with transparent background and other views (and images, layers, etc.) added as subviews.
For the other things I suggest to study how UITableView works and how to push a UIViewController using a UINavigationController.
In general you should study iOS and Objective-C from zero.

(Swift) How to implement a Page Control through paging single views?

I want to implement a page control in my project so that every view can be accessed through swiping left or right. Every example I have looked at is to do with images, not views. I've been studying this and its of course images again. My application is a single view application. I'm not really sure what code snippets to give you so far, I don't think I do because I haven't done anything on this yet. If you need specifics, please comment and ask me, i'll be here all day.
Please help me!
Thanks.
The same idea should apply in the tutorial you cited. They're adding UIImageView to a UIScrollView. So in your case, instead of UIImageView just use UIView. Also you can think of the pageImages array as a data source about your views. For example, instead of an array of UIImage you can just have an array of some model object that helps you configure your view. However, keep in mind that the implementation in the tutorial for your case won't scale if you plan to have a lot of UIViews. That's because you want to effectively reuse views that aren't showing. When it gets to that point, you're better off implementing a UITableView that scrolls horizontally.
You can use UIPageViewController for paging effect. Check out this tutorial. It is written in obj-c but who cares. It will give you idea about using UIPageViewController.

Resources