Status bar tap should scroll table view to the top [duplicate] - iphone

This question already has answers here:
How to detect touches in status bar
(11 answers)
Closed 9 years ago.
Can anybody please tell me how to implement tap on status bar and table view should scroll to top. I also have another scroll view in that view controller for some different purpose.
Thanks in advance

If you are having more than one scrollview inside the viewcontroller, you set setScrollsToTop property to YES for the scrollview you want to scroll when user taps status bar. And also set that property to NO for all other scrollviews.
If there is only one scrollview/tableview, You don't even need to do this. It will be set automatically.
[myScrollView setScrollsToTop:YES];
[otherScrollview setScrollsToTop:NO];

Related

How to remove scrollview sidebar swift [duplicate]

This question already has answers here:
How to hide scroll bar of UICollectionView
(3 answers)
Closed 2 years ago.
I am creating a swiping controller from collection views in my app, but one problem I am having is I am not able to get rid of the thin rectangle that appears whenever I swipe from one collection view cell to the next. The rectangle I am talking about also appears whenever you are scrolling in a scrollview. I am not sure what the proper terminology for this is however I would really appreciate it if someone could help me understand how to get rid of this.
if you are using StoryBoard uncheck Show Horizantal Indicator and Show Vertical Indicator
And in code you can do
scrollView.showsHorizontalScrollIndicator = false
scrollView.showsVerticalScrollIndicator = false
Have you tried:
myCollectionView.showsHorizontalScrollIndicator = false
myCollectionView.showsVerticalScrollIndicator = false
Those properties are inherited of UIScrollView

How to create an immovable TableView? [duplicate]

This question already has answers here:
Preventing UITableView from scrolling?
(2 answers)
Closed 6 years ago.
I would like to create a Sign Up page in my application and I want to create an immovable table(witch you can not scroll). I'm doing this in Swift language, if somebody knows will be very helpful. Sign Up Page
In the inspector window of the tableview storyboard turn off anything related to scrolling. And then just make sure your table view height does not exceed the view height
Have you tried setting the bounces property to NO?
You can use the following code:
tableView.bounces = false
tableView.scrollEnabeld = false
From https://stackoverflow.com/a/5344072/4882590
You can do that from your XIB as well as programmatically.
From XIB:
Just select the tableView and in Inspector uncheck bounce horizontally & bounce vertically and scroll horizontally and scroll vertically
Programmatically:
If you want to do that programmatically then you can try
self.tableView.scrollEnabled = false
OR
[self.tableView setScrollEnabled:NO];

Cannot freeze the table header while scrolling the rows? [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Some Gap remains between Table Top and Table Header only when table loads and scrolled down to the last row?
I am using Xcode.
self.mytable.tableheaderview=label;
By this code I can get the header but I can not freeze it...plz help
The best thing to do is create a UIViewController which is a UITableViewDelegate and UITableViewDataSource, and have a UILabel at the top of the UIViewController's nib, and a UITableView underneath the UILabel. This will have the effect of having the UILabel staying put in its position, with the UITableView still able to scroll like normal. Hope that Helps!
This question sounds a like one I just answered here. All you should have to do is set yourTable.bounces = NO; in your viewDidLoad function. Either that or uncheck the "Bounces" option in the NIB if you used Interface Builder to layout your table.
What do you mean by freezing? If what you think is to stop it from scrolling while scrolling the rows of the table, I don't think its possible. See the table header is part of the table view and is designed to scroll along with the rows. If you just want a header that is static, dont make it a table header. Just add a view or label separately and place it above the table view. The table view will then scroll below that.

how to change colour of arrow in uitableview [duplicate]

This question already has answers here:
Which is the best way to change the color/view of disclosure indicator accessory view in a table view cell in iOS?
(12 answers)
Closed 8 years ago.
I want that the arrow of Tablecell is visible permanently. currently it is visible only on selection.
secondly i want to change its colour from white to orrange.
How i will do this.
Regards
Nauman k
You can find your answer here:
Which is the best way to change the color/view of disclosure indicator accessory view in a table view cell in iOS?

Checkable UIPickerView [duplicate]

This question already has answers here:
How can I get a check mark beside UIPickerView labels?
(2 answers)
Closed 9 years ago.
i can't find a property to set my UIPickerView checkable... in other programs, I can select a item and the pickerView show a checkmark :-(
Here I solve this problem by creating controller.With this we can able to design view with our own way.Here,I use a UITableView and some custom Delegates methods to create a picker view.
Hope,it solve your problem
Check this link also:
Click here!
You will have to make a custom picker view. There is a method that is viewForPickerView:atComponent:row: or something like that. You will need to return your own view and do your own logic to draw a checkmark.
See my answer here for an elaboration of reproducing a checkmark-enabled UIPickerView, like the one Mobile Safari uses for dropdown menus.