Giter VIP home page Giter VIP logo

Comments (21)

skywinder avatar skywinder commented on May 19, 2024

Hello! Only on device? in simulator it works fine?
Very strange bug. Probably even not project's, but Apple.
Can you provide a little bit more details?

from actionsheetpicker-3.0.

89moku avatar 89moku commented on May 19, 2024

Hi Petr,
yes only on device… It’s really strange, and on first release of iOS 7 I didn’t had this bug. I think that I got it from iOS 7.1
I’ve a view controller with a MKMapView and the yellow UIButton, with an action when it’s tapped:

  • (IBAction)categoryFilter:(UIControl *)sender {
    NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
    if([language isEqualToString:@"it"]){
    [ActionSheetStringPicker showPickerWithTitle:@"Filtra Categoria" rows:self.categories initialSelection:0 target:self successAction:@selector(filterMap:) cancelAction:nil origin:sender];
    }
    else{
    [ActionSheetStringPicker showPickerWithTitle:@"Filter Category" rows:self.categories initialSelection:0 target:self successAction:@selector(filterMap:) cancelAction:nil origin:sender];
    }
    }

If you need something more, tell me!
Thank you for your quick reply.

Mauro

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

Just for sure: try to set origin to self.view

- (IBAction)categoryFilter:(UIControl *)sender {
    NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
    if([language isEqualToString:@"it"]){
        [ActionSheetStringPicker showPickerWithTitle:@"Filtra Categoria" 
            rows:self.categories 
            initialSelection:0 
            target:self 
            successAction:@selector(filterMap:) 
            cancelAction:nil 
            origin:self.view];
    }
    else{
        [ActionSheetStringPicker showPickerWithTitle:@"Filter Category" 
            rows:self.categories 
            initialSelection:0 
            target:self 
            successAction:@selector(filterMap:) 
            cancelAction:nil 
            origin:self.view];
    }
}

from actionsheetpicker-3.0.

89moku avatar 89moku commented on May 19, 2024

Already tryed but no results.

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

Is this problem still actual?
Just for test:
Can you try to set your MKMapView to hidden before show the picker?
like:
mkview.hidden = YES;

from actionsheetpicker-3.0.

89moku avatar 89moku commented on May 19, 2024

Hi Petr,
I've tried to hide the mkview but there's no good news :(
mkview_hidden

Thank you for your kindly help.

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

Very strange.
Especially - how your buttons (Filtra Categoria and GPS location) can stay in front of picker. Did you add these buttons programmatically? How?

from actionsheetpicker-3.0.

89moku avatar 89moku commented on May 19, 2024

I add them in storyboard, they're fixed, nothing is added programmatically

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

So, what about example of the project? Did you try to run it on your device? is it works correctly?

Ok.. Let's try a dirty hack to figure out, where is the problem.
Let's try to add red background exactly the same size like our actionSheet.
And after dismissing you should see the red frame exactly the same size like actionSheet view.

Add these 3 lines before calling ActionSheet:

- (IBAction)categoryFilter:(UIControl *)sender {

    UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 223.25, 320, 433)];
    [view setBackgroundColor:[UIColor redColor]];
    [self.view addSubview:view];

    NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
    if([language isEqualToString:@"it"]){
        [ActionSheetStringPicker showPickerWithTitle:@"Filtra Categoria" 
            rows:self.categories 
            initialSelection:0 
            target:self 
            successAction:@selector(filterMap:) 
            cancelAction:nil 
            origin:self.view];
    }
    else{
        [ActionSheetStringPicker showPickerWithTitle:@"Filter Category" 
            rows:self.categories 
            initialSelection:0 
            target:self 
            successAction:@selector(filterMap:) 
            cancelAction:nil 
            origin:self.view];
    }
}

It should cover all of your views and you should see something like this:
screen shot 2014-06-24 at 00 45 39

from actionsheetpicker-3.0.

89moku avatar 89moku commented on May 19, 2024

This is what I see...
red

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

well, go ahead.

Please, set the breakpoint on the line:
_actionSheet.bounds = CGRectMake(0, 0, self.viewSize.width, sheetHeight);

Here is most strange part of legacy code.
Tell me please the value of this parameters here:
self.viewSize.height
sheetHeight
aView.frame.size.height

from actionsheetpicker-3.0.

89moku avatar 89moku commented on May 19, 2024

self.viewSize.height = 480
sheetHeight = 433
aView.frame.size.height = not available... I see that aView._viewDelegate is nil, is it correct?

from actionsheetpicker-3.0.

Frozenleaf avatar Frozenleaf commented on May 19, 2024

Interesting thing is, I am observing the same problem with iPhone 4.
It doesn't happen on iPhone 4s, which has the same screen size.

If you adjust the brightness of the area below the "Filtra Categoria" you will need a vertically compress version of the scroll wheel.

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

@89moku Yes, it's correct. I have no idea why this could happen.
The last thing, that I can recommend to try - is try to push new ViewController and try to represent it there.

@Frozenleaf Very strange bug. So, what about example project? Is it works on iPhone 4?

from actionsheetpicker-3.0.

garbatix avatar garbatix commented on May 19, 2024

I have the same problem on real device iPhone 4. And it only happen on real device (iOS 7.1), on simulator is ok.

zdjecie

from actionsheetpicker-3.0.

JaseElder avatar JaseElder commented on May 19, 2024

I'm getting the same thing on iPhone 4, 7.1.1
Same with the example project.

The values I get for the above are

self.viewSize.height = 480
sheetHeight = 433
aView.frame.size.height = 260

On iPad 4, 7.1.1, running as an iPhone app, the problem goes away.

from actionsheetpicker-3.0.

JaseElder avatar JaseElder commented on May 19, 2024

I think I've sorted it and added a Pull Request.
I hope so anyway, I'm not really sure about how to use GitHub

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

@JaseElder thanks! 👍 You're do it right!
@garbatix, @89moku #6 - should fix this problem.
Let me know about results!

from actionsheetpicker-3.0.

skywinder avatar skywinder commented on May 19, 2024

try to update pod:
pod 'ActionSheetPicker-3.0', '~> 1.0.8'

from actionsheetpicker-3.0.

JaseElder avatar JaseElder commented on May 19, 2024

pod's all good for me.
Cheers!

from actionsheetpicker-3.0.

garbatix avatar garbatix commented on May 19, 2024

Works great now. Thanks.

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.