I want the similar function that facebook app use to load new post feeds in their app, It works like they check for feed update every few minutes and if their are new feed are available then there will be a button will appear on top of Table view named new feed and when it tapped it will load all new feed cell one by one with animation not not reloading complete table. I just want some guidance any help will be appreciated
Edit:
What I have now is
A UITableView which loads feed from the server when first loads and there is also pull to refresh control their.
What I have to do now is.
Put a timer to check feed changes( easy to do no problem with that)
load new table view cell on top without making any changes on the
screen except the new feed button.
On tap of button scroll up to show all new cell.
Related
First of all, I am new in coding, so please be patient with me.
My app has two view controller, the first has UICollectionView and the second has UITextField.
I am trying to tap on one of these collection view cells and then it takes me to the second view controller, where I can type in the textView then save it into CoreData. And then when I go back and press on the same cell i get my saved text. Then when i change this text on the ui text view.. it saved automatically.
Can any one give me an example or put me in the right track
The essence of how that might be done is to implement the collectionview delegate and then determine which cell they clicked on, so that the next screen loads/and updates the correct data. After they click you would call the "segue" with some code. The segues are setup in Xcode's visual editor by control click and dragging a line to the second view. (It's weird, there are some great youtube videos out there) The data would be stored in an array. After you update the data, you could dismiss the second view and the collectionview behind it would be visible again.
I would check out chapter 4.5 of the free iBook "App Development with Swift". Chapters 4.5-4.8 would really get your rocking the right path. If that book is too complex then also look into "Intro to App Development with Swift"
I even have some videos to take you through the process, dunno if I have one for 4.5 but if you continue with it, I have one for 4.6.
https://www.youtube.com/watch?v=Q5u9SGhQoPY&t=2254s
Im extremely new to iOS and i have a requirement where in table view, each cell displays list of stores near by and also an info button at the end which shows the timings of the stores. Info accessory button like this and my requirement is to display callout alert as below on tap of that button.
Do I need to create custom view of small size and display that view every time when user taps on that? Please advice how to achieve this in Swift.
I'm working on a sample iOS app and want to load (in a tableViewController) certain data based on the button the user presses at the top of the view. For example, when the user loads the page it will by default load data from "myPosts" but on the top of the view there will be two buttons "My Posts", "Not My Posts". If they then select the "Not My Posts" button then the tableview cells will be reloaded with the data from "notMyPosts". Anybody know how to do this?
So, the best solution here is to use a Segmented Control. Basically, you will have a controller for each TableView and a controller for the SegmentedControl.
This tutorial and this question gives a basic idea on the segmentedControl and how to set the basic controller for it. You will basically have a Container View with a view for each tableView you want to display and show/hide it based on the selected segment on the SegmentedControl.
This is how your storyboard will look like:
Just use two different datasources for your table, depending on which button the user selects.
So, when the user taps on a button set a variable to keep track of which button they tapped, and then reload your tableview.
I am using the PFQueryTableViewController, and i am trying to achieve auto loading as the user gets to the bottom of the current page of results (paginating). Everything is querying and displaying as it should.
The issue is when calling loadNextPage() as the user scrolls to the bottom. When loadNextPage() is called, it also refreshes the tableView, sending the feed to the top and losing your place in the feed. It is correctly adding the next set of posts in the feed. I would like it to work like instagrams feed, where it lands seamlessly in the background and doesn't reload the entire table every time a new page of data is loaded and added to the feed.
Any ideas on this?
Fixed by loading next page sooner. I was loading the next page as the user approached the bottom of the screen. I tripled this value and it works much better.
I have a UITableView that is separated into sections with one row each. Each row contains a horizontally scrolled UICollectionView. I am wanting to add the functionality for editing this list when I tap a general edit button in the top of my Navigation Controller. The issue that I'm thinking of is that all of the content will still move around and be active (tapping on a cell in the CollectionView will open a different page). I am wanting the edit mode to either disable that functionality or slide all of the content over simultaneously and have an edit button next to them all. When this edit button is pressed it will take the user to an edit page specific to that rows content (so no delete functionality here). Another reason why I am having a difficult time is that all of the content in the table will be loaded via data so I don't want to reload any of it.
Bottom line is that I need to select a single row and it must be done via a button that slides in or altering the functionality of the content there to act as a button. I cannot reload the data in the rows, though because it is loaded via internet data.