-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started working on a new hourly forecast view
- Loading branch information
Showing
5 changed files
with
103 additions
and
9 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...ather-app/View Controllers/MainVC/HourlyCollectionViewCell/HourlyCollectionViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// HourlyCollectionViewCell.swift | ||
// weatherkit-weather-app | ||
// | ||
// Created by Ruslan Spirkin on 7/28/23. | ||
// | ||
|
||
import UIKit | ||
|
||
class CustomCell: UICollectionViewCell { | ||
// Add UI elements as needed | ||
var titleLabel: UILabel! | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setupUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
setupUI() | ||
} | ||
|
||
private func setupUI() { | ||
titleLabel = UILabel() | ||
titleLabel.textAlignment = .center | ||
titleLabel.font = UIFont.systemFont(ofSize: 16.0) | ||
contentView.addSubview(titleLabel) | ||
|
||
// Add constraints or adjust frames | ||
titleLabel.translatesAutoresizingMaskIntoConstraints = false | ||
NSLayoutConstraint.activate([ | ||
titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor), | ||
titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), | ||
titleLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), | ||
titleLabel.bottomAnchor.constraint(equalTo: contentView.bottomAnchor) | ||
]) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+4.61 KB
(100%)
...odeproj/project.xcworkspace/xcuserdata/RuslanS.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters