Skip to content

Commit

Permalink
[FEAT] 기본적인 거 맞춰서 구현(#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoonAh-dev committed Jul 1, 2021
1 parent 1183151 commit 79bf7d2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "스크린샷 2021-06-30 오후 11.42.21.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import UIKit

class ViewController: UIViewController {
let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: CarouselLayout())

let charcters: [String] = ["yaggung", "2D", "yaggung", "2D", "yaggung", "2D", "yaggung", "2D", "yaggung", "2D"]

override func viewDidLoad() {
super.viewDidLoad()
Expand Down Expand Up @@ -46,6 +48,7 @@ extension ViewController: UICollectionViewDataSource {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: testCVC.identifier, for: indexPath) as? testCVC else {
return UICollectionViewCell()
}
cell.imageView.image = UIImage(named: charcters[indexPath.item])
return cell
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import UIKit
class testCVC: UICollectionViewCell {
static let identifier = "testCVC"

@IBOutlet weak var imageView: UIImageView!

override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
Expand Down
8 changes: 4 additions & 4 deletions YoonAh-dev/CarouselEffectTest/CarouselEffectTest/testCVC.xib
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<rect key="frame" x="0.0" y="0.0" width="181" height="146"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="2D" translatesAutoresizingMaskIntoConstraints="NO" id="bg8-my-T4D">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="bg8-my-T4D">
<rect key="frame" x="0.0" y="0.0" width="181" height="146"/>
</imageView>
</subviews>
Expand All @@ -29,10 +29,10 @@
<constraint firstItem="bg8-my-T4D" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="mdt-gH-dr6"/>
</constraints>
<size key="customSize" width="181" height="146"/>
<connections>
<outlet property="imageView" destination="bg8-my-T4D" id="K9M-25-MIH"/>
</connections>
<point key="canvasLocation" x="38" y="48"/>
</collectionViewCell>
</objects>
<resources>
<image name="2D" width="135" height="116"/>
</resources>
</document>

0 comments on commit 79bf7d2

Please sign in to comment.