GithubHelp home page GithubHelp logo

subdigital / bsmodalpickerview Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 26.0 353 KB

A custom view component that presents a UIPickerView with a simple list of options, along with a toolbar for Done/Cancel and a faded backdrop view.

License: MIT License

Ruby 3.10% Objective-C 96.90%

bsmodalpickerview's People

Contributors

sethfri avatar subdigital 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bsmodalpickerview's Issues

Cancel saves incorrect selection

After selecting a value in the picker and then pressing Cancel, the next time the picker is displayed, it is displaying the value last selected even though the user pressed Cancel and did not want that value saved.

Doesn't respond to rotation

In the NSScreencast #26 I added the following to the ViewController.m

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
    return YES;
    }
  • (BOOL)shouldAutorotate
    {
    return YES;
    }
  • (NSUInteger)supportedInterfaceOrientations
    {
    return UIInterfaceOrientationMaskAll;
    }

I then run it, hit the button, then rotate the device. The view doesn't update and now is only half visible.

I'm not sure, but does the view need to respond to the layout subviews and take action on that? Haven't had time to look into the source yet.

add DatePicker

would be awesome if there is a DatePicker equivalent. BSModalDatePickerView

Blank Values

It seems in iOS9 the picker is having some issue presenting the values. They show up blank.

You can reproduce this in the demo as well. Open demo, click Choose Color, select any color other than Green, hit Done, Select Choose Color, Values are then blank.

Any thoughts?

Picker Called from View to be shown at ViewController

Say I have a view where i made a call to show the Picker

// View - PriceView

BSModalPickerView *bsPickerView = [[BSModalPickerView alloc] initWithValues:@[@"$", @"Rs", @"P"]];
[bsPickerView presentInView:self withBlock:^(BOOL madeChoice) {
if (madeChoice) {
NSLog(@"%@", bsPickerView.selectedValue);
}
}];

// ViewController

PriceView *view = [PriceView newPriceOptionView];
[self.view addSubview:view];

I want pickerView code on View,
But picker should be displayed at View Controller.
Eg - Now if I do so, the picker will shows at at the bottom of view which is of size x = 0, y = 10, h= 30, w=320.

screen shot 2013-08-22 at 11 48 07 am

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.