Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Somes issues (tableview, pickerview, navigationcontroller) #109

Open
gilthonweapps opened this issue Sep 21, 2013 · 20 comments
Open

Somes issues (tableview, pickerview, navigationcontroller) #109

gilthonweapps opened this issue Sep 21, 2013 · 20 comments
Labels

Comments

@gilthonweapps
Copy link

Hi,

I am using your library on one of my app and I have some issues when I seet it in iOS6.

  1. NavigationController:
  • iOS 6
    image
  • i0S 7
    image

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.

  1. TableView
  • iOS 6
    image
  • iOS 7
    image

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?

  1. PickerView
  • iOS 6
    image
  • iOS 7
    image

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!

@gilthonweapps
Copy link
Author

I have to add that the pickerView is only filled with ??? instead of the numbers.

@youknowone
Copy link
Owner

Thank you for report. Could you explain more about last comment? do you mean '?' for blank picker view content?

@gilthonweapps
Copy link
Author

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;
    }

@youknowone
Copy link
Owner

Oh, unfortunately, viewForRow: is not implemented in UI7PickerView yet, sorry.

@gilthonweapps
Copy link
Author

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.

@youknowone
Copy link
Owner

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!

@gilthonweapps
Copy link
Author

Ok great. Feel free to ask ;-)

youknowone added a commit that referenced this issue Sep 23, 2013
@youknowone
Copy link
Owner

  1. viewForRow: is supported now - but I am not sure this implementation is similar to UIPickerView
  2. 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.

@youknowone
Copy link
Owner

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?

@gilthonweapps
Copy link
Author

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.

@gilthonweapps
Copy link
Author

Concerning the grouped table view, here is how I configure it:

image

youknowone added a commit that referenced this issue Sep 23, 2013
@youknowone
Copy link
Owner

viewForRow: working example:
ios simulator screen shot 2013 9 24 2 51 50

code: https://github.com/youknowone/UI7Kit/blob/master/UI7KitCatalog/UICPickerViewController.m#L71

NOTE: Text is not visible in iOS7

@gilthonweapps
Copy link
Author

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).

@gilthonweapps
Copy link
Author

If I use the selectRow:inComponent:animated method of the pickerView (configured with the viewForRow), I have this behaviour:
image

In my code, I selected 10:16 and you can see the picker is not properly selected.

@youknowone
Copy link
Owner

Try 0.9.7. I fixed color problems.

@gilthonweapps
Copy link
Author

I have tested 0.9.7. Some issues have been fixed, thank you :-)

Here are issues with GroupedTableView:

iOS6
image

iOS7
image

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?

youknowone added a commit that referenced this issue Sep 25, 2013
@youknowone
Copy link
Owner

I am sorry for late. Time is always running.

See commit 1a61f65

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.

@gilthonweapps
Copy link
Author

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! :-)

youknowone added a commit that referenced this issue Sep 26, 2013
@youknowone
Copy link
Owner

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

@gilthonweapps
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants