Swift button not showing on tableviewcell when app is run - swift

I have a quick simple question for you. I have a tableview and want to add a button(which is a star image) to every cell. Thus in the storyboard I drag a button into my tableview prototype cell. I can see perfectly that there is a button in the main.storyboard in my cell but, when I run the app no button is appearing in any tableview cell. How can I fix this issue? I'd appreciate any help!!

You need to create custom class for tableViewCell, and with this class, you can add your button. It's similar like in this tutorial, just instead of images, you can add buttons. On youtube you can find some good tutorial as well.

Related

UitableView image to fullscreen

I am writing a program in Xcode in which i work with a tableview. In this tableview in every cell there is a small image. Now i would like this image to become full screen when the user taps it. I know this question was already asked several times but either the answer was in objective c (I'm writing in Swift) or when explain in Swift it swift. If someone could help me and give me a other solution or translate the working answers to Swift I'd be so so grateful. That would be awesome.
Thanks a lot.
Here are the links to the answers which seem to work (regarding the number of upvotes or checks ):
Expand UIImageView to full screen from within UITableViewCell
FullScreen image through tap on TableCell's image
Make a new View in your storyboard. Make a segue from the cell to the new view then in the viewcontroller overwrite the prepareForSegue method. you have to pass the image to the new view.
This link could help: http://jamesleist.com/ios-swift-passing-data-between-viewcontrollers/

UIImageView and UItextView inside TableView

I'm working on iOS RSS app, and my last view, which is a UIViewController, is similar to the attached image. I inserted in my DetailView.xib, one Image View to pass the images of the RSS feeds and two Text View to pass the title and summary respectively.
The question is, how can i make the same, but inside a UITableview?
you can use custom cells for it and can add this custom cell at particular index. At first index you just add image view and at second index you just add textview.
Check out this pretty good tutorial Custom UITableViewCell Using Interface Builder.
i hope it helps you.
You can achieve this particular thing by using Custom Table View Cell.
Table View gets created using single Table View Cell again and again. It is much more efficient and uses less memory.
You should check this tutorial.
I hope it will help you.
Thanks
You can make TableView height UITableView.automaticDimension and make sure UITextView autoscroll is disabled and constraint should be leading, trailing, bottom and top.
Here's the link this might work for you:
How to make a UITextView Expand with the text like the Notes app

How to show custom options on swipe table cell in a simple way

I am working on a app which includes table cells. I want that when i swipe table cell it shows two options, first about that cell value and another for delete that value. How can i show that in a way that the cell value shows in half of cell and the options show in half of cell.
Thanks in advance.
There are an out of the box solution, called HHPanningTableViewCell. It does exactly what you need!
HHPanningTableViewCell is a UITableViewCell implementing "swipe to reveal" a drawer view. Such a view typically holds action buttons applying to the current row.
This library, SWTableViewCell, should help you:
https://github.com/CEWendel/SWTableViewCell
An easy-to-use UITableViewCell subclass that implements a swipeable content view which exposes utility buttons (similar to iOS 7 Mail Application)
You have to create a custom cell and override Apple's behavior which is swipe left to delete and then show your options. You can add gesture recognizer to the cell and on swipe to left animate the cell content view and animate in your option view or however you like it to be. I can write up an example code if you need.

Element on IOS Programming

Im kinda new to Stack Overflow so bear with me please. I am trying to design an iPhone app and I noticed a feature on Huffington Post app that I have been trying to replicate with a different style. I am confused on whether they are loading this as a html inside a webview, or if they are reproducing this programmatically on XCode.
I have looked at UI Picker and UI PopOverController and neither can replicate into that. Can someone give me some advise on what element I have to use in XCode?
Here are some attached screenshots
Based on what your screen shot looks like, here is my guess of what they did:
On the view which they bring up the "popover", they have a UITableView with custom UITableViewCell. At the right end of the UITableViewCell(the image with plus sign) is a button, and based on the position of the button, they can decide the position of the popover and direction of the arrow.
They used a custom popover control. Inside the popover, there is a UITableView take all the space.
If you wanna do the same thing, you will have to know
How to use custom UITableViewCell.
How to do popover on iPhone.
Delegation if you wanna the view underneath to react to what you click inside your popover.
I can provide more details if you need.

Radio button feature in uiindexed tableview in iPhone app

I am creating an app in which user has been provided with the feature just like radio button.
I had added the button in tableview cell and its also acting like radio button but not in all cells working only in some of the cells.
Also the cells on which feature is working i have problem that it get deselected when i scroll the table view.
Please anyone help me out or provide a snippet.
Appreciate your help.
When the UITableViewCell scrolls off the screen, it is actually reused by the UITableView. You will need to account for this by saving off the state of each button in your model the moment they are pressed and then during tableView:cellForRowAtIndexPath:, read back in that value and set the button's state.