Showing
14 changed files
with
85 additions
and
12 deletions
No preview for this file type
| ... | @@ -57,6 +57,7 @@ import SwiftEventBus | ... | @@ -57,6 +57,7 @@ import SwiftEventBus | 
| 57 | topBorderLine.contentMode = .scaleAspectFit | 57 | topBorderLine.contentMode = .scaleAspectFit | 
| 58 | 58 | ||
| 59 | NSLayoutConstraint.activate([ | 59 | NSLayoutConstraint.activate([ | 
| 60 | + topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 60 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 61 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 
| 61 | ]) | 62 | ]) | 
| 62 | 63 | ... | ... | 
| ... | @@ -72,6 +72,7 @@ import AVFoundation | ... | @@ -72,6 +72,7 @@ import AVFoundation | 
| 72 | topBorderLine.contentMode = .scaleAspectFit | 72 | topBorderLine.contentMode = .scaleAspectFit | 
| 73 | 73 | ||
| 74 | NSLayoutConstraint.activate([ | 74 | NSLayoutConstraint.activate([ | 
| 75 | + topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 75 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 76 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 
| 76 | ]) | 77 | ]) | 
| 77 | 78 | ... | ... | 
| ... | @@ -63,6 +63,7 @@ import SwiftEventBus | ... | @@ -63,6 +63,7 @@ import SwiftEventBus | 
| 63 | topBorderLine.contentMode = .scaleAspectFit | 63 | topBorderLine.contentMode = .scaleAspectFit | 
| 64 | 64 | ||
| 65 | NSLayoutConstraint.activate([ | 65 | NSLayoutConstraint.activate([ | 
| 66 | + topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 66 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 67 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 
| 67 | ]) | 68 | ]) | 
| 68 | 69 | ... | ... | 
| ... | @@ -12,6 +12,7 @@ import SwiftEventBus | ... | @@ -12,6 +12,7 @@ import SwiftEventBus | 
| 12 | @objc public class GiftsViewController: UIViewController { | 12 | @objc public class GiftsViewController: UIViewController { | 
| 13 | @IBOutlet weak var mainView: UIView! | 13 | @IBOutlet weak var mainView: UIView! | 
| 14 | @IBOutlet weak var tableView: UITableView! | 14 | @IBOutlet weak var tableView: UITableView! | 
| 15 | + @IBOutlet weak var topBorderShadow: UIImageView! | ||
| 15 | 16 | ||
| 16 | public var campaigns:Array<swiftApi.CampaignItemModel> = [] { | 17 | public var campaigns:Array<swiftApi.CampaignItemModel> = [] { | 
| 17 | didSet { | 18 | didSet { | 
| ... | @@ -59,17 +60,31 @@ import SwiftEventBus | ... | @@ -59,17 +60,31 @@ import SwiftEventBus | 
| 59 | 60 | ||
| 60 | } | 61 | } | 
| 61 | 62 | ||
| 62 | - tableView.clipsToBounds = true | 63 | +// tableView.clipsToBounds = true | 
| 63 | - tableView.layer.cornerRadius = 30 | 64 | +// tableView.layer.cornerRadius = 30 | 
| 64 | - tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 65 | +// tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 
| 65 | tableView.contentInset.top = 50 | 66 | tableView.contentInset.top = 50 | 
| 66 | 67 | ||
| 67 | // Add Top left corner radius | 68 | // Add Top left corner radius | 
| 68 | - mainView.clipsToBounds = true | 69 | +// mainView.clipsToBounds = true | 
| 69 | - mainView.layer.cornerRadius = 30 | 70 | +// mainView.layer.cornerRadius = 30 | 
| 70 | - mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 71 | +// mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 
| 71 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | 72 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | 
| 72 | 73 | ||
| 74 | + let image = UIImage(named: "top_border_shadow", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | ||
| 75 | + var aspectR: CGFloat = 0.0 | ||
| 76 | + | ||
| 77 | + aspectR = image.size.width/image.size.height | ||
| 78 | + | ||
| 79 | + topBorderShadow.translatesAutoresizingMaskIntoConstraints = false | ||
| 80 | + topBorderShadow.image = image | ||
| 81 | + topBorderShadow.contentMode = .scaleAspectFit | ||
| 82 | + | ||
| 83 | + NSLayoutConstraint.activate([ | ||
| 84 | + topBorderShadow.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 85 | + topBorderShadow.heightAnchor.constraint(equalTo: topBorderShadow.widthAnchor, multiplier: 1/aspectR) | ||
| 86 | + ]) | ||
| 87 | + | ||
| 73 | } | 88 | } | 
| 74 | 89 | ||
| 75 | public override func viewWillAppear(_ animated: Bool) { | 90 | public override func viewWillAppear(_ animated: Bool) { | ... | ... | 
| ... | @@ -12,6 +12,7 @@ import SwiftEventBus | ... | @@ -12,6 +12,7 @@ import SwiftEventBus | 
| 12 | @objc public class MFYViewController: UIViewController { | 12 | @objc public class MFYViewController: UIViewController { | 
| 13 | @IBOutlet weak var mainView: UIView! | 13 | @IBOutlet weak var mainView: UIView! | 
| 14 | @IBOutlet weak var tableView: UITableView! | 14 | @IBOutlet weak var tableView: UITableView! | 
| 15 | + @IBOutlet weak var topBorderShadow: UIImageView! | ||
| 15 | 16 | ||
| 16 | var categories: Array<CampaignCategory> = [CampaignCategory]() { | 17 | var categories: Array<CampaignCategory> = [CampaignCategory]() { | 
| 17 | didSet { | 18 | didSet { | 
| ... | @@ -50,17 +51,31 @@ import SwiftEventBus | ... | @@ -50,17 +51,31 @@ import SwiftEventBus | 
| 50 | self.refreshData() | 51 | self.refreshData() | 
| 51 | } | 52 | } | 
| 52 | 53 | ||
| 53 | - tableView.clipsToBounds = true | 54 | +// tableView.clipsToBounds = true | 
| 54 | - tableView.layer.cornerRadius = 30 | 55 | +// tableView.layer.cornerRadius = 30 | 
| 55 | - tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 56 | +// tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 
| 56 | tableView.contentInset.top = 50 | 57 | tableView.contentInset.top = 50 | 
| 57 | 58 | ||
| 58 | // Add Top left corner radius | 59 | // Add Top left corner radius | 
| 59 | - mainView.clipsToBounds = true | 60 | +// mainView.clipsToBounds = true | 
| 60 | - mainView.layer.cornerRadius = 30 | 61 | +// mainView.layer.cornerRadius = 30 | 
| 61 | - mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 62 | +// mainView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 
| 62 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | 63 | mainView.backgroundColor = UIColor(red: 0.22, green: 0.32, blue: 0.40, alpha: 1.00) | 
| 63 | 64 | ||
| 65 | + let image = UIImage(named: "top_border_shadow", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)! | ||
| 66 | + var aspectR: CGFloat = 0.0 | ||
| 67 | + | ||
| 68 | + aspectR = image.size.width/image.size.height | ||
| 69 | + | ||
| 70 | + topBorderShadow.translatesAutoresizingMaskIntoConstraints = false | ||
| 71 | + topBorderShadow.image = image | ||
| 72 | + topBorderShadow.contentMode = .scaleAspectFit | ||
| 73 | + | ||
| 74 | + NSLayoutConstraint.activate([ | ||
| 75 | + topBorderShadow.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 76 | + topBorderShadow.heightAnchor.constraint(equalTo: topBorderShadow.widthAnchor, multiplier: 1/aspectR) | ||
| 77 | + ]) | ||
| 78 | + | ||
| 64 | } | 79 | } | 
| 65 | 80 | ||
| 66 | public override func viewWillAppear(_ animated: Bool) { | 81 | public override func viewWillAppear(_ animated: Bool) { | ... | ... | 
| ... | @@ -324,6 +324,9 @@ | ... | @@ -324,6 +324,9 @@ | 
| 324 | <outlet property="delegate" destination="YRk-Az-LOb" id="xhM-mG-VTI"/> | 324 | <outlet property="delegate" destination="YRk-Az-LOb" id="xhM-mG-VTI"/> | 
| 325 | </connections> | 325 | </connections> | 
| 326 | </tableView> | 326 | </tableView> | 
| 327 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8mV-zg-aKO"> | ||
| 328 | + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/> | ||
| 329 | + </imageView> | ||
| 327 | </subviews> | 330 | </subviews> | 
| 328 | <color key="backgroundColor" red="0.21960784310000001" green="0.32156862749999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/> | 331 | <color key="backgroundColor" red="0.21960784310000001" green="0.32156862749999998" blue="0.4039215686" alpha="1" colorSpace="calibratedRGB"/> | 
| 329 | <constraints> | 332 | <constraints> | 
| ... | @@ -331,6 +334,9 @@ | ... | @@ -331,6 +334,9 @@ | 
| 331 | <constraint firstItem="A8b-3b-5xc" firstAttribute="top" secondItem="NSn-MS-EVn" secondAttribute="top" id="Gfl-IG-H5C"/> | 334 | <constraint firstItem="A8b-3b-5xc" firstAttribute="top" secondItem="NSn-MS-EVn" secondAttribute="top" id="Gfl-IG-H5C"/> | 
| 332 | <constraint firstAttribute="trailing" secondItem="A8b-3b-5xc" secondAttribute="trailing" id="Xth-7O-TIk"/> | 335 | <constraint firstAttribute="trailing" secondItem="A8b-3b-5xc" secondAttribute="trailing" id="Xth-7O-TIk"/> | 
| 333 | <constraint firstItem="A8b-3b-5xc" firstAttribute="leading" secondItem="NSn-MS-EVn" secondAttribute="leading" id="bdZ-c7-9jg"/> | 336 | <constraint firstItem="A8b-3b-5xc" firstAttribute="leading" secondItem="NSn-MS-EVn" secondAttribute="leading" id="bdZ-c7-9jg"/> | 
| 337 | + <constraint firstItem="8mV-zg-aKO" firstAttribute="leading" secondItem="NSn-MS-EVn" secondAttribute="leading" id="eeL-Df-GVU"/> | ||
| 338 | + <constraint firstItem="8mV-zg-aKO" firstAttribute="top" secondItem="NSn-MS-EVn" secondAttribute="top" id="jVC-qs-cac"/> | ||
| 339 | + <constraint firstAttribute="trailing" secondItem="8mV-zg-aKO" secondAttribute="trailing" id="zBg-nO-B4w"/> | ||
| 334 | </constraints> | 340 | </constraints> | 
| 335 | </view> | 341 | </view> | 
| 336 | </subviews> | 342 | </subviews> | 
| ... | @@ -346,6 +352,7 @@ | ... | @@ -346,6 +352,7 @@ | 
| 346 | <connections> | 352 | <connections> | 
| 347 | <outlet property="mainView" destination="NSn-MS-EVn" id="8Ux-Ip-hGi"/> | 353 | <outlet property="mainView" destination="NSn-MS-EVn" id="8Ux-Ip-hGi"/> | 
| 348 | <outlet property="tableView" destination="A8b-3b-5xc" id="0Nr-bb-I5x"/> | 354 | <outlet property="tableView" destination="A8b-3b-5xc" id="0Nr-bb-I5x"/> | 
| 355 | + <outlet property="topBorderShadow" destination="8mV-zg-aKO" id="BxW-Q3-Kr2"/> | ||
| 349 | </connections> | 356 | </connections> | 
| 350 | </viewController> | 357 | </viewController> | 
| 351 | <placeholder placeholderIdentifier="IBFirstResponder" id="cet-Ta-bHg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 358 | <placeholder placeholderIdentifier="IBFirstResponder" id="cet-Ta-bHg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 
| ... | @@ -1302,11 +1309,17 @@ | ... | @@ -1302,11 +1309,17 @@ | 
| 1302 | <outlet property="delegate" destination="wy8-hC-CyC" id="mdR-Aj-QGh"/> | 1309 | <outlet property="delegate" destination="wy8-hC-CyC" id="mdR-Aj-QGh"/> | 
| 1303 | </connections> | 1310 | </connections> | 
| 1304 | </tableView> | 1311 | </tableView> | 
| 1312 | + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NqU-qs-YbE"> | ||
| 1313 | + <rect key="frame" x="0.0" y="420" width="414" height="11.5"/> | ||
| 1314 | + </imageView> | ||
| 1305 | </subviews> | 1315 | </subviews> | 
| 1306 | <color key="backgroundColor" red="0.2196078431372549" green="0.32156862745098036" blue="0.40392156862745099" alpha="1" colorSpace="calibratedRGB"/> | 1316 | <color key="backgroundColor" red="0.2196078431372549" green="0.32156862745098036" blue="0.40392156862745099" alpha="1" colorSpace="calibratedRGB"/> | 
| 1307 | <constraints> | 1317 | <constraints> | 
| 1308 | <constraint firstItem="Obj-Bh-L89" firstAttribute="top" secondItem="gxz-nY-dFI" secondAttribute="top" id="ECw-Zp-2Tr"/> | 1318 | <constraint firstItem="Obj-Bh-L89" firstAttribute="top" secondItem="gxz-nY-dFI" secondAttribute="top" id="ECw-Zp-2Tr"/> | 
| 1319 | + <constraint firstItem="NqU-qs-YbE" firstAttribute="leading" secondItem="gxz-nY-dFI" secondAttribute="leading" id="EOR-Jd-ced"/> | ||
| 1309 | <constraint firstAttribute="trailing" secondItem="Obj-Bh-L89" secondAttribute="trailing" id="M3y-23-abb"/> | 1320 | <constraint firstAttribute="trailing" secondItem="Obj-Bh-L89" secondAttribute="trailing" id="M3y-23-abb"/> | 
| 1321 | + <constraint firstAttribute="trailing" secondItem="NqU-qs-YbE" secondAttribute="trailing" id="RSj-oS-ZrU"/> | ||
| 1322 | + <constraint firstItem="NqU-qs-YbE" firstAttribute="top" secondItem="gxz-nY-dFI" secondAttribute="top" id="ZVc-bP-xeu"/> | ||
| 1310 | <constraint firstAttribute="bottom" secondItem="Obj-Bh-L89" secondAttribute="bottom" id="lop-u2-nwa"/> | 1323 | <constraint firstAttribute="bottom" secondItem="Obj-Bh-L89" secondAttribute="bottom" id="lop-u2-nwa"/> | 
| 1311 | <constraint firstItem="Obj-Bh-L89" firstAttribute="leading" secondItem="gxz-nY-dFI" secondAttribute="leading" id="q6N-T6-U0n"/> | 1324 | <constraint firstItem="Obj-Bh-L89" firstAttribute="leading" secondItem="gxz-nY-dFI" secondAttribute="leading" id="q6N-T6-U0n"/> | 
| 1312 | </constraints> | 1325 | </constraints> | 
| ... | @@ -1324,6 +1337,7 @@ | ... | @@ -1324,6 +1337,7 @@ | 
| 1324 | <connections> | 1337 | <connections> | 
| 1325 | <outlet property="mainView" destination="gxz-nY-dFI" id="nfd-vO-aaA"/> | 1338 | <outlet property="mainView" destination="gxz-nY-dFI" id="nfd-vO-aaA"/> | 
| 1326 | <outlet property="tableView" destination="Obj-Bh-L89" id="5cL-tU-7Lw"/> | 1339 | <outlet property="tableView" destination="Obj-Bh-L89" id="5cL-tU-7Lw"/> | 
| 1340 | + <outlet property="topBorderShadow" destination="NqU-qs-YbE" id="gMS-ef-Szc"/> | ||
| 1327 | </connections> | 1341 | </connections> | 
| 1328 | </viewController> | 1342 | </viewController> | 
| 1329 | <placeholder placeholderIdentifier="IBFirstResponder" id="YLX-2E-CQz" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | 1343 | <placeholder placeholderIdentifier="IBFirstResponder" id="YLX-2E-CQz" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ... | ... | 
| ... | @@ -63,6 +63,7 @@ import MapKit | ... | @@ -63,6 +63,7 @@ import MapKit | 
| 63 | topBorderLine.contentMode = .scaleAspectFit | 63 | topBorderLine.contentMode = .scaleAspectFit | 
| 64 | 64 | ||
| 65 | NSLayoutConstraint.activate([ | 65 | NSLayoutConstraint.activate([ | 
| 66 | + topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 66 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 67 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 
| 67 | ]) | 68 | ]) | 
| 68 | 69 | ... | ... | 
SwiftWarplyFramework/SwiftWarplyFramework/Media.xcassets/top_border_shadow.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "filename" : "top_border_shadow.png", | ||
| 5 | + "idiom" : "universal", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "filename" : "top_border_shadow-1.png", | ||
| 10 | + "idiom" : "universal", | ||
| 11 | + "scale" : "2x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "filename" : "top_border_shadow-2.png", | ||
| 15 | + "idiom" : "universal", | ||
| 16 | + "scale" : "3x" | ||
| 17 | + } | ||
| 18 | + ], | ||
| 19 | + "info" : { | ||
| 20 | + "author" : "xcode", | ||
| 21 | + "version" : 1 | ||
| 22 | + } | ||
| 23 | +} | 
 
903 Bytes
 
903 Bytes
 
903 Bytes
| ... | @@ -67,6 +67,7 @@ import SwiftEventBus | ... | @@ -67,6 +67,7 @@ import SwiftEventBus | 
| 67 | topBorderLine.contentMode = .scaleAspectFit | 67 | topBorderLine.contentMode = .scaleAspectFit | 
| 68 | 68 | ||
| 69 | NSLayoutConstraint.activate([ | 69 | NSLayoutConstraint.activate([ | 
| 70 | + topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 70 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 71 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 
| 71 | ]) | 72 | ]) | 
| 72 | 73 | ... | ... | 
| ... | @@ -64,6 +64,7 @@ import SwiftEventBus | ... | @@ -64,6 +64,7 @@ import SwiftEventBus | 
| 64 | topBorderLine.contentMode = .scaleAspectFit | 64 | topBorderLine.contentMode = .scaleAspectFit | 
| 65 | 65 | ||
| 66 | NSLayoutConstraint.activate([ | 66 | NSLayoutConstraint.activate([ | 
| 67 | + topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), | ||
| 67 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 68 | topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) | 
| 68 | ]) | 69 | ]) | 
| 69 | 70 | ... | ... | 
- 
Please register or login to post a comment
