I am working on a navigation based app. every cell has a detail view. i have textView in detail view which shows details of selected cell. is it possible to add a facebook like icon in the end of textView? and if no then how should i do that. thanx in advance.
You can put the icon after the textview, or you can overlay it on top of the textview. It's as simple as putting it there in interface builder:
or, just set the frame properties of the text view and the image view to overlap, and place the image view on top of the text view (simplest way is just to "addSubview" it 2nd, which will place it on top).
Related
I have implemented a image slider with a UICollectionView inside a UITableViewCell which the user can slide to left and right. I want to create two buttons on this UITableViewCell so the user can also tap on that buttons to slide the images.
I've done this by adding the buttons on the images inside the UICollectionViewCells but with that the buttons also are swiping when the user swipes to left or right or taps the buttons.
I tried to fix the buttons on the UITableViewCell, but anyhow the buttons does not get displayed, when I do it like this.
So how can I achieve this, that the buttons are fixed inside the UITableViewCell and the UICollectionView inside the UITableViewCell can move it cells without effecting these two slider buttons?
At storyboard it looks like this:
Can't rearrange the buttons:
Add the buttons directly to the content view of the table view cell, don't add them to the collection view. That way they will stay in position. If you can't see them it's possible that they were underneath the collection view and were obscured. Change the order of the views in interface builder by dragging and dropping in the document outline. This changes which view is on top.
The document outline is the view you have posted as a screenshot in your question, starting at "brandsCollectionTableViewCell". The outline contains the subviews of the cell. Views with the same parent, like the image view, label and buttons currently shown in the outline, will be ordered "on top" of each other by their position in the list. So you drag the items in that list to change the order, or select the buttons then go to Editor -> Arrange -> Send XX to adjust the position.
Use the Xcode view hierarchy debugger to help you understand what is happening (that's this button on the debugging toolbar):
The 3D view will let you see where your "missing" buttons are.
If you really want to include the buttons in the collection view, then you need to use a custom collection view layout implementing floating views. That's not a straightforward task, but I've written something about it here.
an App Shopper implement
As shown in picture:
there is a table item or a button "Read More..."
when click this button, the button animates to this piece of words' end to show all words up. As shown in picture 2
Is it a UITextView?
The "Button" is a UIButton or a Table Item?
How to implement this animation?
I did something similar by simply having UILabels and UITextViews lined up vertically. For the button I use a transparent UIButton of type UIButtonTypeCustom. Then I change the frame & text of the labels / textviews (the one with the text, and the ones below it) in an animation block.
There is also a way to do this in a table view. There is an Apple sample code project with section headings that you can click to expand. But the section is still visible, so perhaps this is not the right approach for you.
I'm trying to add a button on the bottom of a TableView, without any success.
The idea isn't to use the tableFooterView property, as that doesn't show the button in a fixed position.
My idea is more along the lines of the Facebook application's Notifications bar on the bottom.
I'm using Three20.
Any pointers on how I can achieve this?
Thanks
Just add button to the view below your tableview but ensure your table height is less than the position you are adding the button,this way your can scroll table above button & your button will always be visible
Just embed custom view over your tableview.i mean on the bottom of tableview.so the tableview will scroll and the view don't.
Add a UIView as the footerView and then add the UIButton to the UIView.
The only UITableViews I have worked with thus far are sized to fill the entire page.
I'm trying to create a page in my app where I will have an image and a label on the top of the page followed by a UITableView to hold comments below it.
Something like this springs to mind: http://www.inquisitr.com/wp-content/fbb.jpg
My problem is if I add a UITableView below the image and label, when I scroll the tableview then only the UITableView cells scroll. Not the entire page.
How would I go about making the entire page scroll so that the label and image scroll off the page and more table cells appear?
Thanks.
Put your image and label in a container UIView, and then set that container to the tableHeaderView property of your UITableView.
You could try setting the tableHeaderView property of the UITableView to a custom view containing your controls.
I have a UITableView that contains text field in each row. The text field is allowed to take only numbers and decimals. I have a transparent background button to help users click on the view to dispose the keypad when it is up. The text fields at the bottom of the view are getting covered by the keypad, so I wanted to move the view by capturing the textDidBeginEditing method etc and animating the view upward. The problem I notice is that after this code to move the view was added, if the numeric keypad is up and if I click on the view outside the keypad to dispose it, the background button does not receive the event so the keypad is not disposed. Can this be fixed? Thanks
I think the problem is the button does not cover the entire view. For your convenience you can make the button non-transparent and have some image on it to see its size.
Confirm the button is on the top of the view layer order.
Also confirm the button is there on the view after the view animation.