Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3fc83e7

Browse files
authored
Merge pull request#397 from 52inc/xcode12
Xcode12 Auto-layout Feedback Loop Fixes
2 parentsa34e0ed +d84be49 commit3fc83e7

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

‎Pulley.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.newdo |s|
1010
s.name='Pulley'
11-
s.version='2.8.3'
11+
s.version='2.8.4'
1212
s.summary='A library to imitate the iOS 10 Maps UI.'
1313

1414
# This description is used to generate tags and improve search results.

‎Pulley.xcodeproj/xcshareddata/xcschemes/PulleyDemo.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<CommandLineArguments>
6363
<CommandLineArgument
6464
argument ="-UIViewLayoutFeedbackLoopDebuggingThreshold 100"
65-
isEnabled ="NO">
65+
isEnabled ="YES">
6666
</CommandLineArgument>
6767
</CommandLineArguments>
6868
</LaunchAction>

‎PulleyLib/PulleyViewController.swift

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
328328
/// The inset from the top safe area when the drawer is fully open. This property is only for the 'drawer' displayMode. Use panelInsets to control the top/bottom/left/right insets for the panel.
329329
@IBInspectablepublicvardrawerTopInset:CGFloat=20.0{
330330
didSet{
331-
ifself.isViewLoaded
331+
ifoldValue!= drawerTopInset,self.isViewLoaded
332332
{
333333
self.view.setNeedsLayout()
334334
}
@@ -338,7 +338,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
338338
/// This replaces the previous panelInsetLeft and panelInsetTop properties. Depending on what corner placement is being used, different values from this struct will apply. For example, 'topLeft' corner placement will utilize the .top, .left, and .bottom inset properties and it will ignore the .right property (use panelWidth property to specify width)
339339
@IBInspectablepublicvarpanelInsets:UIEdgeInsets=UIEdgeInsets(top:10.0, left:10.0, bottom:10.0, right:10.0){
340340
didSet{
341-
ifself.isViewLoaded
341+
ifoldValue!= panelInsets,self.isViewLoaded
342342
{
343343
self.view.setNeedsLayout()
344344
}
@@ -348,7 +348,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
348348
/// The width of the panel in panel displayMode
349349
@IBInspectablepublicvarpanelWidth:CGFloat=325.0{
350350
didSet{
351-
ifself.isViewLoaded
351+
ifoldValue!= panelWidth,self.isViewLoaded
352352
{
353353
self.view.setNeedsLayout()
354354
}
@@ -362,7 +362,9 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
362362
didSet{
363363
ifself.isViewLoaded
364364
{
365-
self.view.setNeedsLayout()
365+
if oldValue!= drawerCornerRadius{
366+
self.view.setNeedsLayout()
367+
}
366368
drawerBackgroundVisualEffectView?.layer.cornerRadius= drawerCornerRadius
367369
}
368370
}
@@ -374,7 +376,10 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
374376
ifself.isViewLoaded
375377
{
376378
drawerShadowView.layer.shadowOpacity= shadowOpacity
377-
self.view.setNeedsLayout()
379+
if oldValue!= shadowOpacity
380+
{
381+
self.view.setNeedsLayout()
382+
}
378383
}
379384
}
380385
}
@@ -385,19 +390,27 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
385390
ifself.isViewLoaded
386391
{
387392
drawerShadowView.layer.shadowRadius= shadowRadius
388-
self.view.setNeedsLayout()
393+
if oldValue!= shadowRadius
394+
{
395+
self.view.setNeedsLayout()
396+
}
389397
}
398+
390399
}
391400
}
392401

393402
/// The offset of the drawer shadow.
394403
@IBInspectablepublicvarshadowOffset=CGSize(width:0.0, height:-3.0){
395404
didSet{
396-
ifself.isViewLoaded{
397-
drawerShadowView.layer.shadowOffset= shadowOffset
398-
self.view.setNeedsLayout()
399-
}
400-
}
405+
ifself.isViewLoaded
406+
{
407+
drawerShadowView.layer.shadowOffset= shadowOffset
408+
if oldValue!= shadowOffset
409+
{
410+
self.view.setNeedsLayout()
411+
}
412+
}
413+
}
401414
}
402415

403416
/// The opaque color of the background dimming view.
@@ -576,7 +589,9 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
576589
return
577590
}
578591

579-
self.view.setNeedsLayout()
592+
if oldValue!= supportedPositions{
593+
self.view.setNeedsLayout()
594+
}
580595

581596
if supportedPositions.contains(drawerPosition)
582597
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp