Summary: We still need to wait for the `YGUnitPoint` PR to be merged :) But please let me know what you think. One caveat: because of a limitation of Swift, a literal value can be automatically understood as a point-based `YGValue`, but variables have to be explicitly cast. I haven't found a way around it yet: ``` view.yoga.width = 10 // value == 10, unit == YGUnitPixel let a: CGFloat = 100 view.yoga.height = a // Compiler error view.yoga.height = YGValue(a) // works, not great ``` Closes https://github.com/facebook/yoga/pull/390 Reviewed By: emilsjolander Differential Revision: D4954021 Pulled By: maxoll fbshipit-source-id: 5eff6aeb6dd969d0d5dc557b149bb5819b0e31de
30 lines
1.1 KiB
Ruby
30 lines
1.1 KiB
Ruby
podspec = Pod::Spec.new do |spec|
|
|
spec.name = 'YogaKit'
|
|
spec.version = '1.3.0'
|
|
spec.license = { :type => 'BSD', :file => "LICENSE" }
|
|
spec.homepage = 'https://facebook.github.io/yoga/'
|
|
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
|
|
|
|
spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
|
|
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
|
|
|
|
spec.authors = 'Facebook'
|
|
spec.source = {
|
|
:git => 'https://github.com/facebook/yoga.git',
|
|
:tag => '1.3.0',
|
|
}
|
|
|
|
spec.platform = :ios
|
|
spec.ios.deployment_target = '7.0'
|
|
spec.ios.frameworks = 'UIKit'
|
|
|
|
spec.dependency 'Yoga', '~> 1.3'
|
|
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
|
|
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
|
|
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
|
|
end
|
|
|
|
# See https://github.com/facebook/yoga/pull/366
|
|
podspec.attributes_hash["readme"] = "YogaKit/README.md"
|
|
podspec
|