Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ipad layout on iOS 9.0 #628

Closed
wants to merge 3 commits into from
Closed

Conversation

jakubprusa
Copy link

Fix layout in both rotations, portrait and landscape

Mentioned in these issues: #627 #554

Fix layout in both rotations, portrait and landscape
@jakubprusa
Copy link
Author

I tried to run test on own pc and all tests passed. Can you please explain me where is the error?

@bmichotte
Copy link
Contributor

What if you change your if by

if([self.tableView respondsToSelector:@selector(cellLayoutMarginsFollowReadableWidth))
{
    self.tableView.cellLayoutMarginsFollowReadableWidth = NO;
}

@jakubprusa
Copy link
Author

Hi i can try it, but when i'am testing on my localhost i had same results as for SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO.

@jakubprusa
Copy link
Author

Finished with same result, any idea why?

@bmichotte
Copy link
Contributor

mhhh, ok, this is because the installed xcode version on travis is a 6, so it compiles with ios 8.4 as target and therefore does not find the property at compile time.

The tests should pass using performSelect:. Unfortunately, this property takes a BOOL, so the only way is either with
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
or with

NSMethodSignature* signature = [[self.tableView class] instanceMethodSignatureForSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)];
NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature];
[invocation setTarget:self.tableView];
[invocation setSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)];

BOOL boolValue = NO;
[invocation setArgument:&boolValue atIndex: 2];
[invocation invoke];

@jakubprusa
Copy link
Author

Wow, i see this pattern for first time. Should i make another commit with this code or do you prefer some another way?

Or you can update build script for xcode 7. I don't if you just select another virtual machine with newer xcode and that's it or you need to do something more. But at least i consider to update travis CI to newer version.

@bmichotte
Copy link
Contributor

(i'm not related to xmartlabs, I just really wish this issue to be fixed ^^)
You can add osx_image: xcode7 on the .travis.yml file but I don't know if the vm is stable

@mtnbarreto / @mats-claassen could you please check this PR please ?

@jakubprusa
Copy link
Author

You can make change directly to your dowloaded pod and wait for it, you want it asap :D
I will try your remake of code and will se what happend :)

@jakubprusa
Copy link
Author

@mtnbarreto / @mats-claassen ping? :)

mtnbarreto pushed a commit that referenced this pull request Nov 12, 2015
mtnbarreto pushed a commit that referenced this pull request Nov 12, 2015
@mtnbarreto
Copy link
Member

@bmichotte @jakubprusa Thanks for helping me with this!

@mtnbarreto mtnbarreto closed this Nov 12, 2015
@bmichotte
Copy link
Contributor

@mtnbarreto thanks for the merge !

(maybe it's time to consider osx_image: xcode7 in .travis.yml btw :)

@mtnbarreto
Copy link
Member

@bmichotte sure! Seems current Xcode version sdk does not even has cellLayoutMarginsFollowReadableWidth method.

markrickert added a commit to markrickert/XLForm that referenced this pull request Nov 30, 2015
* master: (23 commits)
  Add XLFormRowDescriptorTypeImage
  improve RTL language support.
  prevent XLFormInlineSelectorCell from removing the row beneath when not first responder
  fix xmartlabs#629
  upgrade travis Xcode version to 7
  fix xmartlabs#554 and xmartlabs#628.
  Tidied up master header, adding imports for missing public headers.
  Add Carthage documentation to README.
  Add Carthage support.
  XLFormButtonCell -> textLabel -> textAlignment changed to NSTextAlignmentNatural. Looks much better for RTL languages
  clean up swift example code
  clean up swift code.
  clean up swift example project
  Xcode 7 changes
  minor change
  Announcing Eureka - Elegant iOS Forms in pure Swift 2
  Update to Swift 2.0
  fixed layout constraints when working with iPad or big iPhones. closes xmartlabs#554.
  add NSCoding protocol a XLFormOptionsObject class
  Change XLFormDateCell to call update when value changes, so that subclasses can change the UI properly
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants