Skip to content

Commit

Permalink
redraw canvas after subviews relayouted
Browse files Browse the repository at this point in the history
  • Loading branch information
Harley-xk committed Oct 12, 2018
1 parent c8f46fd commit 6101b03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MaLiang.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'MaLiang'
s.version = '1.1.6'
s.version = '1.1.7'
s.summary = 'MaLiang is a painting Framework based on OpenGL ES.'

s.description = <<-DESC
Expand All @@ -21,7 +21,7 @@ The name of "MaLiang" comes from a boy who had a magical brush in Chinese ancien
s.source = { :git => 'https://github.com/harley-xk/MaLiang.git', :tag => s.version.to_s }

s.ios.deployment_target = '9.0'
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.1' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }

s.source_files = 'MaLiang/Classes/**/*'

Expand Down
5 changes: 5 additions & 0 deletions MaLiang/Classes/Canvas.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ open class Canvas: MLView {
}
}

open override func layoutSubviews() {
super.layoutSubviews()
redraw()
}

// MARK: - Document
public private(set) var document: Document?
public func setupDocument() throws {
Expand Down

0 comments on commit 6101b03

Please sign in to comment.