sammcewan / WYPopoverController

WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
Other
253 stars 74 forks source link

Respect content size in popViewControllerAnimated #63

Open tomhamming opened 9 years ago

tomhamming commented 9 years ago

If you push a new view controller on to a UINavigationController in a popover, the popover size changes to the size of the new view controller. If you then pop back, the size doesn't change back. Seems like it should.

JulesMoorhouse commented 9 years ago

UIKit`-[UIApplication sendAction:to:from:forEvent:]: 0x10dcebd57 <+0>: pushq %rbp 0x10dcebd58 <+1>: movq %rsp, %rbp 0x10dcebd5b <+4>: pushq %r15 0x10dcebd5d <+6>: pushq %r14 0x10dcebd5f <+8>: pushq %r12 0x10dcebd61 <+10>: pushq %rbx 0x10dcebd62 <+11>: movq %r9, %r14 0x10dcebd65 <+14>: movq %r8, %r15 0x10dcebd68 <+17>: movq %rcx, %rbx 0x10dcebd6b <+20>: movq %rdx, %r12 0x10dcebd6e <+23>: testq %rbx, %rbx 0x10dcebd71 <+26>: jne 0x10dcebd89 ; <+50> 0x10dcebd73 <+28>: movq 0xd8f636(%rip), %rsi ; "_targetInChainForAction:sender:" 0x10dcebd7a <+35>: movq %r12, %rdx 0x10dcebd7d <+38>: movq %r15, %rcx 0x10dcebd80 <+41>: callq 0xb55242(%rip) ; (void )0x000000010f7b2000: objc_msgSend 0x10dcebd86 <+47>: movq %rax, %rbx 0x10dcebd89 <+50>: movq 0xd8f628(%rip), %rsi ; "performSelector:withObject:withObject:" 0x10dcebd90 <+57>: movq %rbx, %rdi 0x10dcebd93 <+60>: movq %r12, %rdx 0x10dcebd96 <+63>: movq %r15, %rcx 0x10dcebd99 <+66>: movq %r14, %r8 0x10dcebd9c <+69>: callq 0xb55226(%rip) ; (void )0x000000010f7b2000: objc_msgSend 0x10dcebda2 <+75>: testq %rbx, %rbx 0x10dcebda5 <+78>: setne %al 0x10dcebda8 <+81>: popq %rbx 0x10dcebda9 <+82>: popq %r12 0x10dcebdab <+84>: popq %r14 0x10dcebdad <+86>: popq %r15 0x10dcebdaf <+88>: popq %rbp 0x10dcebdb0 <+89>: retq

JulesMoorhouse commented 9 years ago

I've very keen to provide further testing if you produce a fix.

Thanks :)

sammcewan commented 9 years ago

@jules2010 is this crash report related specifically to this branch? It's not very useful as it's not symbolicated so you can't tell what's actually crashing it. Please clarify what we're looking at and if explicitly related to this pull request provide a symbolicated crash report if possible.

JulesMoorhouse commented 9 years ago

Yes it's this branch. It only seems to crash in the simulator, I'm was running the ios 8.3 on iPhone 6+. I have tried on on my device, exact same spec, but it doesn't crash.

I can't produce a symbolised stack from Xcode, here's a screenshot. (If you can tell me how to do this in xcode, I will do so and report back.)

screen shot 2015-05-30 at 07 12 34

PS. I was having some difficulty with setting the preferred content size, however I was setting the wrong size, as a result I'm setting it in a lot of places. On the device, (where the code from this branch didn't crash), it didn't seem to restore the size when using popViewControllerAnimated, please can you highlight where I SHOULDN'T (or where I should) be setting preferred content size, perhaps that's why it isn't resizing ?