Code Monkey home page Code Monkey logo

Comments (15)

skywinder avatar skywinder commented on June 15, 2024

Yes, very strange bug. I'l handle it.
What is "Form Sheet" and "Page Sheet"?
Can you provide more details to reproduce it:
What kind of Picker?
Which version of iOS?
Can you upload full sreenshot?
Some examples of code to reproduce?

from actionsheetpicker-3.0.

LeoSnek avatar LeoSnek commented on June 15, 2024

Form Sheet you can see here: http://www.nanaimostudio.com/blog/2010/6/30/modal-form-sheet-navigation-controller.html

Page Sheet: https://cdn.tutsplus.com/mobile/uploads/legacy/iOS-SDK_MFMailComposeViewController/MFMailComposeViewController_iPadMailInterface.png

I'm using an ActionSheetStringPicker, nothing special. My calling code hasn't changed in over a year and works in all scenarios apart from if my button is inside either of the two views mentioned.

I'm running 7.1.2.

Can't provide any more right now.

from actionsheetpicker-3.0.

jnpdx avatar jnpdx commented on June 15, 2024

This bug also occurs in v1.1.3 with the iOS 8 beta

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

I not reproduce this bug yet.
Recently I apply fix for sizes ( #25 ) I suppose, it could resolve this issue too. Can you check, Is it reproduced on 1.1.4 ?

from actionsheetpicker-3.0.

jnpdx avatar jnpdx commented on June 15, 2024

Confirmed -- still happens on 1.1.4

Note that the buttons only fail to appear the first time the picker is displayed -- buttons are there subsequent times

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

Ok, so, let's go deeper!
@jnpdx can you provide some code example to reproduce it?

from actionsheetpicker-3.0.

jnpdx avatar jnpdx commented on June 15, 2024

Create a single view iPad application and this should do it in ViewController.h

#import "ViewController.h"
#import "ActionSheetStringPicker.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.


    UIButton *b = [UIButton buttonWithType:UIButtonTypeSystem];
    b.frame = CGRectMake(0, 0, 100, 100);
    [b setTitle:@"Test" forState:UIControlStateNormal];
    [self.view addSubview:b];

    [b addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
}

- (void) buttonPressed:(id)sender {
    NSLog(@"Test");

    UIViewController *x = [[UIViewController alloc] init];
    x.modalPresentationStyle = UIModalPresentationFormSheet;

    [self showViewController:x sender:self];
    x.view.backgroundColor = [UIColor whiteColor];

    UIButton *b = [UIButton buttonWithType:UIButtonTypeSystem];
    b.frame = CGRectMake(0, 0, 100, 100);
    [b setTitle:@"Picker" forState:UIControlStateNormal];
    [x.view addSubview:b];

    [b addTarget:self action:@selector(pickerButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
}

- (void) pickerButtonPressed:(id)sender {
    NSLog(@"Picker");

    [ActionSheetStringPicker showPickerWithTitle:@"Title"  rows:@[@"Row1",@"Row2",@"Row3"] initialSelection:0  doneBlock:nil cancelBlock:nil origin: (UIView*)sender ];
}

@end

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

@jnpdx you forgot specify implementation for [self showViewController: sender:]
Ok, I replaced it with
[self presentViewController:x animated:YES completion:nil];
And know I get the same issue. Ok, try to research it soon! Thanks.

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

It very strange bug. Because everything works as expected, all buttons created, but the are not visible! You can also try to click on it, and they clicked!
Ok. I create workaround for it. Thanks for notice. Now it should work.
Check version 1.1.5

You can test it in example project. I create additional modal Popover button for it.

from actionsheetpicker-3.0.

LeoSnek avatar LeoSnek commented on June 15, 2024

Yep this worked, thanks!

Can I ask what you changed please?

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

@staz1000 you can look at lines https://github.com/skywinder/ActionSheetPicker-3.0/blob/540333b4d887df7750a01678303708df5ce8252d/Pickers/AbstractActionSheetPicker.m#L110-115 in commit 540333b

from actionsheetpicker-3.0.

jnpdx avatar jnpdx commented on June 15, 2024

Thanks for the fix! Should the button title strings be localized?

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

@jnpdx Very properly remark, since it not a system button now. Yes, it should.
But unfortunately I do not have time to do it.

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on June 15, 2024

@jnpdx Thanks to you, I have found that cause this error.

[toolBarItemlabel setTextColor:(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) ? [UIColor blackColor] : [UIColor whiteColor]];

Since 1.1.7 buttons will localized again! 🉑

from actionsheetpicker-3.0.

jnpdx avatar jnpdx commented on June 15, 2024

Nice!

from actionsheetpicker-3.0.

Related Issues (20)

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.