Skip to content

Commit

Permalink
Merge pull request #5 from soramitsu/feature/fixes
Browse files Browse the repository at this point in the history
do not round coordinates of BackgroundedContentControl content view
  • Loading branch information
ERussel authored Jun 19, 2020
2 parents d62c9d6 + c6b33c9 commit a4eb7af
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
50 changes: 25 additions & 25 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
PODS:
- SoraUI (1.8.6):
- SoraUI/AdaptiveDesign (= 1.8.6)
- SoraUI/Animator (= 1.8.6)
- SoraUI/Camera (= 1.8.6)
- SoraUI/Controls (= 1.8.6)
- SoraUI/DetailsView (= 1.8.6)
- SoraUI/EmptyState (= 1.8.6)
- SoraUI/LoadingView (= 1.8.6)
- SoraUI/ModalInputPresentation (= 1.8.6)
- SoraUI/PageLoader (= 1.8.6)
- SoraUI/PinView (= 1.8.6)
- SoraUI/Skrull (= 1.8.6)
- SoraUI/AdaptiveDesign (1.8.6)
- SoraUI/Animator (1.8.6)
- SoraUI/Camera (1.8.6)
- SoraUI/Controls (1.8.6)
- SoraUI/DetailsView (1.8.6):
- SoraUI (1.8.10):
- SoraUI/AdaptiveDesign (= 1.8.10)
- SoraUI/Animator (= 1.8.10)
- SoraUI/Camera (= 1.8.10)
- SoraUI/Controls (= 1.8.10)
- SoraUI/DetailsView (= 1.8.10)
- SoraUI/EmptyState (= 1.8.10)
- SoraUI/LoadingView (= 1.8.10)
- SoraUI/ModalInputPresentation (= 1.8.10)
- SoraUI/PageLoader (= 1.8.10)
- SoraUI/PinView (= 1.8.10)
- SoraUI/Skrull (= 1.8.10)
- SoraUI/AdaptiveDesign (1.8.10)
- SoraUI/Animator (1.8.10)
- SoraUI/Camera (1.8.10)
- SoraUI/Controls (1.8.10)
- SoraUI/DetailsView (1.8.10):
- SoraUI/Controls
- SoraUI/EmptyState (1.8.6):
- SoraUI/EmptyState (1.8.10):
- SoraUI/Animator
- SoraUI/LoadingView (1.8.6):
- SoraUI/LoadingView (1.8.10):
- SoraUI/Controls
- SoraUI/ModalInputPresentation (1.8.6):
- SoraUI/ModalInputPresentation (1.8.10):
- SoraUI/Animator
- SoraUI/PageLoader (1.8.6)
- SoraUI/PinView (1.8.6):
- SoraUI/PageLoader (1.8.10)
- SoraUI/PinView (1.8.10):
- SoraUI/Controls
- SoraUI/Skrull (1.8.6)
- SoraUI/Skrull (1.8.10)

DEPENDENCIES:
- SoraUI (from `../`)
Expand All @@ -36,8 +36,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
SoraUI: 1b7f8cc1531bd55a359b8050db0a5f6441d82f03
SoraUI: 236036ed20c4cbe8d379aa3212db4ae6a15a577c

PODFILE CHECKSUM: bb766dae3a5ddd7acf3a123997936163f86b09c0

COCOAPODS: 1.7.5
COCOAPODS: 1.9.1
2 changes: 1 addition & 1 deletion SoraUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SoraUI'
s.version = '1.8.9'
s.version = '1.8.10'
s.summary = 'UI Library for design and layout process simplification.'

s.description = 'Library contains views and controls that simplifies design and layout implementation manually in code or utilizing interface build.'
Expand Down
8 changes: 4 additions & 4 deletions SoraUI/Classes/Controls/BackgroundedContentControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ open class BackgroundedContentControl: UIControl {
guard let currentContentView = contentView else { return }

let contentSize = currentContentView.intrinsicContentSize
let contentX = Int(bounds.size.width / 2.0 - contentSize.width / 2.0
+ (contentInsets.left - contentInsets.right) / 2.0)
let contentY = Int(bounds.size.height / 2.0 - contentSize.height / 2.0
+ (contentInsets.top - contentInsets.bottom) / 2.0)
let contentX = bounds.size.width / 2.0 - contentSize.width / 2.0
+ (contentInsets.left - contentInsets.right) / 2.0
let contentY = bounds.size.height / 2.0 - contentSize.height / 2.0
+ (contentInsets.top - contentInsets.bottom) / 2.0

currentContentView.frame = CGRect(origin: CGPoint(x: contentX, y: contentY), size: contentSize)
}
Expand Down

0 comments on commit a4eb7af

Please sign in to comment.