UI7Kit
UI7Kit copied to clipboard
Somes issues (tableview, pickerview, navigationcontroller)
Hi,
I am using your library on one of my app and I have some issues when I seet it in iOS6.
- NavigationController:
- iOS 6

- i0S 7

As you can see, with iOS 7, the background of the navigation controller is black (in fact, all the views of my app have a black background so it looks fine with that navigation controller). But with iOS 6, I cannot have it in another color than what you see in the screenshot.
- TableView
- iOS 6

- iOS 7

Here, I am using a simple UITableView grouped. With iOS 6, there is an extra white space for the header of each section, even if I don't specify a custom view or title for that section. If I specify one, that extra white space will be added under the title. How to remove that extra space?
- PickerView
- iOS 6

- iOS 7

With iOS 6, how to specify the color of the text in the picker? It would be nice as well to change the color of the separator lines.
Thanks for your help!
I have to add that the pickerView is only filled with ??? instead of the numbers.
Thank you for report. Could you explain more about last comment? do you mean '?' for blank picker view content?
Hi. I use the pickerView to select a time. So, with iOS 7, each part of the pickerView contains numbers from 0 to 9. But with iOS 6, each number is replaced by a '?'.
Here is the code I am using (I removed some parts of the function that are not useful to describe the problem):
-
(UIView )pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { UILabel tView = (UILabel*)view; if (!tView) { tView = [[UILabel alloc] init]; tView.textColor = [UIColor redColor]; tView.text = [NSString stringWithFormat:@"%d", row]; }
return tView; }
Oh, unfortunately, viewForRow: is not implemented in UI7PickerView yet, sorry.
That's sad. I am using it to be able to change the color of the text of each component of the pickerView. Is there another way to do it? Do you have any comments on my other issues? Tell me if you need more information.
No way to do it yet. I should add viewForRow: support for that. I think I should try something first. I will ask things while doing this. Thanks!
Ok great. Feel free to ask ;-)
- viewForRow: is supported now - but I am not sure this implementation is similar to UIPickerView
- about textColor or selectionIndicatorColor, I found this is also not customizable in UIPickerView. So I implemented it in UI7PickerLIkeView but didnt reveal them to UI7PickerView. I wonder how did you do that in iOS7.
About grouped table view, did you remove color of table view in iOS7 or did you remove spaces between section by section? And how did you do that?
I have updated my app with the latest version of your code and the pickerView is now empty. In order to change the color of the text, just have a look at my sample code. As you provide the viewForRow method with a custom view (in my case, a UILabel), you specify the color with the UILabel textColor method. Concerning selectionIndicatorColor, it is black by default in iOS7, that's why we don't see it in my example as the background of my view is black.
Concerning the grouped table view, here is how I configure it:

viewForRow: working example:

code: https://github.com/youknowone/UI7Kit/blob/master/UI7KitCatalog/UICPickerViewController.m#L71
NOTE: Text is not visible in iOS7
I managed to make the pickerView work. I just needed to set a frame to the UILabel I created in the viewForRow method. Thanks. Now, I still would like to have the color of the separator in black (default color).
If I use the selectRow:inComponent:animated method of the pickerView (configured with the viewForRow), I have this behaviour:

In my code, I selected 10:16 and you can see the picker is not properly selected.
Try 0.9.7. I fixed color problems.
I have tested 0.9.7. Some issues have been fixed, thank you :-)
Here are issues with GroupedTableView:
iOS6

iOS7

As you can see, there is a missing separator line under the title of the section. And the space between the title of the section and the first row of the section is too big.
Another problem is for UITableViewCell.accessoryType. If you select UITableViewCellAccessoryCheckmark, the checkmark is black. It should be blue by default.
Concerning the pickerView, I still have the issue mentioned above (the rows not properly selected). I know that this controller is quite difficult to make and I appreciate all the efforts you have already made :-)
You don't have any idea on how to set the color of the navigationBar for the whole app?
I am sorry for late. Time is always running.
See commit 1a61f65002e3a451e417ff58ef64e1f9885fb09b
You can try it from 0.9.8. If you still are seeing gray background, try to change UIWindow background color to black. (I didn't tested this) If it still fails, edit the values from code as workaround. white:0 alpha:255 will make it perfect black.
Hi. Thanks for all the modifications. Did you have time to look at my issue with grouped tableview explained above and the one with the pickerview not selecting properly values? If you need more info, please tell me. After that, everything will be perfect! :-)
I wrote a test code but I found no problem. Could you try my test and figure out what's the difference? Test is UI7KitCatalog -> picker view
Hi. I made some tests again and think I figured out what was wrong. Concerning my issue with the pickerView, I saw that I was selecting the date in the viewDidLoad. If I do it in the viewDidAppear, it works well. So, this problem is solved. Concerning the grouped tableview, the extra space (see my screenshot above) is only visible when I use the method - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section Please note, that in fact the extra space should be above the title and not under. The top separator of the first cell of a section is not showing.
For your information, I am not using Storyboard in my app :-)
Thanks again for your help