Swiping between dynamic UIViews content in IOS swift - ios

I am new to ios and I am trying to find a way of paging through dynamic content.
An example of what I want to achieve is the BBC News app
https://itunes.apple.com/us/app/bbc-news/id364147881?mt=8
The user selects the story from a UItableView and is directed to the detail view.
In the detail view, the user is able to swipe back and forth through the stories instead of going back to the table and choosing another story. I don't really want to make a UIView for every story, since it is difficult to determine how many stories there will be.
I would appreciate if someone could point me to an example of this usage.

Related

iOS swiping/paging between detail pages of Collection View Items

I am working on an iOS app using Xcode 10 and Swift 4.2. I have a collection view that has images and once you tap on the image it takes you to a detail page that has the full-sized image, date and saying displayed. The data for these details are stored in an array and passed from the collection view to the detail page. I want to be able to swipe left or right and go to the previous or next item from the collection view as you would in the photos app.
Is there any built-in functionality that allows for easy paging/swiping, or is a programmatic manipulation of the array index the only way to accomplish this task?
I don't know if you are familiar with CocoaPods, but there are plenty that can work for you, for example there is SwiftPhotoGallery, but that just maximizes images and let you swipe right and left as you said.
For the specific functionality you describe I would suggest that in the navigation to the "Detail Page" you sent the whole array too, and just show the index of the item tapped in the collection, your "Detail Page" will be a UICollection as well but with a custom cell that takes the whole space of the screen and with a horizontal flow so you can swipe right and left, if you have this code in your github account or any other repository I'll be willing to help to make my point clearer.

How can I implement this navigation style used by the InList app?

I'm trying to recreate a navigation feature similar to the one used in the InList app. They have quite a nifty way of sliding from one screen to the other.
Basically, the main screen is a table view with different events for a given city. Tap the button in the top left “London” and the table view ​zooms​ out to show the table views for the other cities.
You can scroll right/left to select a different city.
Tap on and the screen ​zooms​ back in with the new table view.
My questions:
a) Does anybody know if this is a plugin? If so, can you please link it?
b) If it's not a plugin. Can you outline the basic steps you'd take to approach developing this solution for yourself?
Thanks

What type of view is the Twitter profile on iOS? UITableView?

Is the twitter profile view in iOS just ONE very dynamic table view? What's in the header and what's in the cells? I've just started developing for iOS and I'm trying to look at the big players and identify what they use and how they use it.
I've made a similar view, but it's a view comprised of carefully placed subviews, and I'm wondering if something like this would be a better route.
If it is a UITableView, how do they have such dynamic cells with different spacing between them etc? I know you can vary cell sizes, layouts, and insets, but to this degree, in one tableview?
Please don't jump me with downvotes for asking a non-technical question only twitter devs know for sure, I'm just really curious and don't know where else to ask. I'm only looking for a professional opinion.
It looks like it could be a very dynamic UITableView to me. Or at least, it could probably be recreated as a UITableView if it isn't already.
I'm looking at a twitter profile page now, and I would say there's probably 5 sections:
Header (everything from the profile picture to the "follow" button)
Recent Tweets (including the "view more" button)
Photos
"Special" items (Following, Followers, Favorites and Lists)
Who to Follow
The only component of this view that strikes me as particularly unique and special is the banner image that blurs and zooms when you pull down too far. I'm not quite sure how they pulled that off. It's possible that they track the offset of the scroll view, and if the offset is positive (i.e. it was pulled down), then zoom and blur the banner (and use the offset value as a scaling factor somehow).
All the other components could be probably be recreated by (carefully) designing custom UITableViewCells for each unique purpose (e.g. tweets, image carousel, other profiles), and then populating those cells with data from the tweet or profile.

Tracking touch in iOS

I am creating a word search game for the iPhone and am having trouble figuring out what is the best approach to take for the main component of the game (the word search puzzle).
I am currently using a collection view to display the puzzle. However I am having trouble figuring out how to track the users touch on the collection view to highlight letter as they slide their finger across the puzzle.
Iv looked into collection views's selection and highlight features but they don't seem to provide the functionality that I need.
So basically my question are as follows:
Is a collection view the best approach for this type of game (word search)?
If it is, then how do I go about tracking the user input to highlight and return the cells they slide their fingers over?
And if it is not the best approach what are some other options, that make it easier to track users input on a grid like display?
I tired posting images of what I am talking about but can't due so, so hopefully my problem is clear, if not please let me know and I will try to be more specific.
Thank you in advance for any advice and suggestions.
A way to go about this would be to add a pan gesture recognizer to the collection view. Then, you can use indexPathForItemAtPoint: and cellForItemAtIndexPath: to get the correct cell as the user pans. You can then do whatever you want with the individual cells.
There is a great SDK for iOS called HeatMap. You can get more info HERE. I have read lots of good stuff about the developer and the service. Lets you track touch events on selective views.
Here is a screenshot from the demo on that site:

iOS: UI Ideas for moving items between multi-level tableViews

I am building an iOS app that allows the user to browse a tableView, click a cell, then navigate deeper into another tableView using a navigationController.
I have a requirement to be able to move any of those items/cells to another place in the navigation stack. Right now my idea is, once the user selects the cells to move, to display a modal tableView that will allow the user to navigate through the same structure as before, but this time choose the location (by pressing and holding) to place those cells.
Are there any other UI ideas or clever programatic ideas that anyone might have that could be a better solution to this problem?
Perhaps take a look at how Apple's iOS Mail moves email messages between different mailboxes?
This also basically displays a modal view controller, but it flattens the hierarchy, by indenting nested items below their parent objects. You than just select the item that is the destination.
This of course only works if your hierarchy is not too deep, otherwise it's probably best to do it like you outlined it. The only thing I would perhaps recommend doing in addition, is to also have some sort of visual method (button?) to select the destination. A long press by itself might not be intuitive enough.

Resources