Giter Club home page Giter Club logo

cppickerview's People

Contributors

adamcoulombe avatar brianpseudo avatar cbpowell avatar panyam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cppickerview's Issues

ScrollsToTop doesn't work in App

I had issues getting "scrollsToTop" to work properly in my app. What I found out is that only ONE view can have the "scrollsToTop" property set to true at any time for the app to scroll to the top when tapping the status bar.

To fix in your control, I added one line of code to the - (id)initWithFrame:(CGRect)frame method in CPPickerView.m

// content
...
self.contentView.scrollsToTop = NO;
...

Not sure if you needed this property in for another reason, but I believe the default value is YES, so setting it to no does the trick.

malloc: *** error for object 0x#######: double free

I'm trying to use the CPPickerView inside of a typical UITableView cell.

Inside the tableView data source, I have some code to create the cell:

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath,
{
    cell = [tableView dequeueReusableCellWithIdentifier:@"PickerCell"];

    UILabel *lblName = (UILabel *)[cell viewWithTag:100];
    lblName.text = [NSString stringWithString@"Name"];

    CPPickerView *picker = [[CPPickerView alloc] initWithFrame:CGRectMake(197, 8, 112, 30)];
    picker.itemFont = [UIFont boldSystemFontOfSize:14];
    picker.dataSource = self;
    picker.delegate = self;
    [picker reloadData];
    [cell addSubview:picker];
    return cell;
}

When I run this code and it populates my table, I get the following error multiple times:

MyApp72404,0xac51f2c0) malloc: *** error for object 0xb51ad30: double free
*** set a breakpoint in malloc_error_break to debug
MyApp(72404,0xac51f2c0) malloc: *** error for object 0xb51ad30: double free
*** set a breakpoint in malloc_error_break to debug
MyApp(72404,0xac51f2c0) malloc: *** error for object 0xb51ad30: double free
*** set a breakpoint in malloc_error_break to debug
MyApp(72404,0xac51f2c0) malloc: *** error for object 0xb51ad30: double free
*** set a breakpoint in malloc_error_break to debug

I found out that if I comment out the following line, it works fine:
//picker.itemFont = [UIFont boldSystemFontOfSize:14];

I should note that I have disabled ARC for the CPPickerView class.

When using peekInsets, the tracking area also gets smaller...

First, I really like this control!
I was in need for a compact hour/minutes selection, and the standard DatePicker cover half the screen....

But I noticed that as soon as I used the peekInset property, the area where the scrollView tracks the scrolling also gets smaller.

I do realize why, but it really compromises the usability, and basically makes the control annoying to use...
So I can't use the insets, and the GUI loses out on the visual hints that there are more data available...

Can You come up with a solution to make the whole pickerView sensitive for tracking even when we are using the peekInsets?

CPPickerview in scrollview resets itself

Add the control to a table view that scrolls, change the value, scroll it offscreen, and scroll it back onto the screen-- the view will be back to the item at index 0.

Feature request

Hi there,

This is a really cool and easy to use horizontal picker view. Another useful feature would be conditional disabling of scrolling in the picker. For example, when certain conditions are true the value is automatically selected in the picker (which you can already do) and the picker becomes disabled or un-scrollable so the user cant change the values till those conditions remain true.

cheers,
Saad

RGBACOLOR warning

I forgot about this one when I submitted the other two issues.

In -(void)tileViews:

label.textColor = RGBACOLOR(0.0, 0.0, 0.0, 0.75);

gives a warning: "Implicit declaration of function 'RGBACOLOR' is invalid in C99"

Of course this is just a warning and I'm not sure why my Target is set to use GNUC99 now, but regardless, I changed this line to

label.textColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.75];

which matches of [UIColor ] calls you made elsewhere.

hello

when i used your cPPickerView in my table its shows black but when highlighte it it appears , when the highighted goes away ,, its return black ,, do u have any idea how to fix that !??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.