adding items to tableView in IOS - ios

Can someone go help me figure out how to hookup the table view so that i can add items to the table view? I'm trying to make a news screen for this app and am having trouble adding data to it. I have the xib file all set up i just don't know how to hook it all up in xcode 4.

It looked like you have not use UITableView class before. I would suggest get one of the samples from Apple. Here is the link.

Related

TVOS about App layout (Like in iTunes and similar)

I have played a lot with my app and I do not understand how to make layout like in for example iTunes (also many apps uses it).
How it is made? It is one big CollectionView, but with special Flow or it is TableView with many CollectionView?
Collection headers. In iTunes App if I select item (with adjustImageWhenFocused) under the header then the header will jump up and the item will not overlap the header. It is special magic or it is system behavior and I just do know how to use it?
Below is two screenshots about what I am trying to tell you and example with my app.
In iTunes there are movie preview page. With what type of View it is made? TableView,CollectionView or just ViewController with ScrollView?
I have read many sources and looked up demo projects, but nowhere I have found answers for this questions.
1) I think it would be a stackTemplate containing a couple collectionLists.
2) AFAIK the headers "jump up" on their own, no need to prepare anything special.
3) productTemplate?
For examples, see https://github.com/iBaa/PlexConnectApp, /TVMLTemplates/Default/Movie_OnDeck.xml (1) or Movie_PrePlay.xml (3).
Or check the gold source: https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/StackTemplate.html, plus other Templates.
If you want to use native Swift way it can be achieved in following ways:
You can use table view and have collection view within each cell. I am using same approach to achieve this.
We have focus update delegate from there you can find the focused frame of image view. With the help of focused frame and label frame you can check if they are intersecting or not. Based on that you can move label up and down.
This is native TVML template, in order to achieve in swift you need to create view using tableview and collection view.

Putting a UIImageView into table cell for an RSS feed app

I need to create an app for my internship, its an rss feed reader app for a news site that I've been working on for far too long since im trying my best to learn and I need to show something to them soon. I have never made an app in my life and I was allowed to use some free open source code. I found one in swift that is just along the lines of what I need and i put in the rss feed link and it worked. The only thing is, the app doesn't have a thumbnail view preview of the articles picture on the left hand side of the articles cell in the table view navigation controller. I tried putting in a UIImageView into the cell to get it started but it wont let me do it, almost like the cell is locked with just the title and description as seen in the screenshot below:
So the table view controller in my xcode project looks something like this:
(I got that image from google but its about the same minus the fact that I have the date and time of the article under the title instead of summary)
When I try to edit the tableview cell it wont even let me put an imageview there, and when i change it to "custom" the title and summary go away. If anyone could help me to get it to look something like this with the imageview pulling the photo from the article each time it would be greatly appreciated: (Also, I can share the source code via github to view and/or download and run yourself if that would help anyone!)
Thanks
In the attribute inspector, make sure you have the Style for the UITableViewCell set to Custom.
You will need to drag in your labels as well to create your complete cell.

Adding Static Cells to UITableView in Interface Builder for iOS8? Content Section Not Shown

I am trying to add static cells to a UITableView in XCode 6 using Interface Builder. All the tutorials I am seeing online show a section called "Content" which allows the cells to be made static. Also, there is a feature to switch the number of sections.
I have screenshots below for both.
This is the first, with the feature:
This is the second, without the feature:
I could probably figure this out, but I'm wondering why the problem is happening. The one with the feature is from an older version of iOS and is placed inside a storyboard. The one without the feature is from the newest version of iOS and XCode, and is in a .xib file, without a view controller in the file.
I'm thinking this may be an issue with the new XCode, but I'd love to hear why. I'm really needing to make these static cells, and all the answers I've found on the internet seem to assume that this section is available.
Dynamic prototype and static cells are only available in storyboard table views.
Static table view cells are only available when using storyboards. However, if you aren't using storyboards for your entire UI you can still use them for individual screens instead of a collection of screens.
Please see this link.
https://stackoverflow.com/a/11041693/3683148

Can't even get a UITableView to show

I'm starting to learn to program and I'm already getting a really annoying problem. When I follow, step by step, the Apple Developer guide "Start Developing iOS Apps Today" and I add a UITableViewController (even if it's the only view controller in the project) and I set it as the initial ViewController, I run the app to check if it works and I can't get the table view to show, all I see is a blank static background.
It doesn't matter what kind of cell I use, the table view doesn't appear.
What am I doing wrong?
Xcode 5.1, target: iOS 7.1
How to get UItableView to show
Drag a UITableViewController to the storyboard
Give your prototype cell an Identifier (e.g "cell")
Create a Objective-C class file that inherits from the UITableViewController Class.
Assign that class to the ViewController you dragged
Return at least one section
Return at least one row per section
Set a text for the cell in cellAtRowIndex
I created a DEMO PROJECT for you, see how I did things over there.
You can't show a blank table, you need content to show to be able to see your table.

table view is covered with an empty table view when integrate TTCatalog to a Tabbar template project

I created a project with Tabbar template. The First View of my Tabbar project just wants the same function of the TTCatalog sample project. The Second View will integrate a Map function.
I integrate some code from TTCatalog sample project to do so. But when my App starts, only an empty tableview displayed in my first view. It's just a white table with some empty rows. nothing else.
When I quit my App from emulator, and start it again from emulator,first I can see a table view like that of TTCatalog ( with blue titles and labels), But soon the table view is covered with an empty table view.
Please help
thanks
There is no need to inherit CatalogController, if the only thing you need is a tableView inside a tabBarController then there is even no need to use three20 at all. To get started I would recommend you use a simpler approach. While three20 and the TTTableViewController can help a lot with a certain kind of setups, it is not the general best way to do things.
Let your FirstViewController inherit from UITableViewController, implement the UITableViewDataSource methods. If you are experiencing problem or need with a specific problem feel free to ask here.
If you got this working and you really need something that three20 can help you achieve, read through the TTTableViewController sources, TTModel, TTTableViewDataSource, find a tutorial and go on.
Maybe this question may help you: Three20's URL-based navigation + tab bar example? especially this link: http://three20.pypt.lt/url-based-navigation-and-state-persistence

Resources