Skip to content

Commit

Permalink
Refactor: 통화버튼 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyukjin committed Feb 4, 2024
1 parent b7c48a8 commit bc4cf4c
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 16 deletions.
Binary file added iOS/Ringo/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>top-level-items</key>
<array>
<dict>
<key>destination</key>
<dict>
<key>location-parameters</key>
<dict>
<key>EndingColumnNumber</key>
<string>0</string>
<key>EndingLineNumber</key>
<string>19</string>
<key>StartingColumnNumber</key>
<string>0</string>
<key>StartingLineNumber</key>
<string>18</string>
<key>Timestamp</key>
<string>728739826.4251601</string>
</dict>
<key>rebasable-url</key>
<dict>
<key>base</key>
<string>workspace</string>
<key>payload</key>
<dict>
<key>relative-path</key>
<string>Ringo/TabBarViewController.swift</string>
</dict>
</dict>
</dict>
<key>text-context</key>
<dict>
<key>focused</key>
<string> let recentsVC = RecentsViewController()
</string>
<key>leading</key>
<string>
let contactsVC = UINavigationController(rootViewController: ContactsViewController())
</string>
<key>trailing</key>
<string> let accountVC = AccountViewController()
contactsVC.tabBarItem = UITabBarItem(title: "Contacts", image: UIImage(systemName: "person.3"), tag: 1)
</string>
</dict>
<key>title</key>
<string>Error: Cannot find 'ContactsTableViewController' in scope</string>
<key>type</key>
<string>bookmark</string>
</dict>
</array>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>ShowSharedSchemesAutomaticallyEnabled</key>
<true/>
</dict>
</plist>
21 changes: 7 additions & 14 deletions iOS/Ringo/Ringo/ContactsTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ContactsTableViewCell: UITableViewCell {
let call = UIButton()
let info = UIButton()
let paddingView = UIView()
let paddingView2 = UIView()

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
Expand All @@ -36,6 +37,7 @@ class ContactsTableViewCell: UITableViewCell {
contentView.addSubview(stackView)
stackView.addArrangedSubview(paddingView)
stackView.addArrangedSubview(moreStackView)
moreStackView.addArrangedSubview(paddingView2)
moreStackView.addArrangedSubview(call)
}

Expand All @@ -60,9 +62,11 @@ class ContactsTableViewCell: UITableViewCell {

moreStackView.backgroundColor = .systemGray6
moreStackView.axis = .horizontal
moreStackView.alignment = .center
moreStackView.distribution = .equalSpacing
moreStackView.alignment = .fill
moreStackView.distribution = .fill
moreStackView.addBorders(edges: [.top], color: .systemGray4, thickness: 1)
moreStackView.layoutMargins = UIEdgeInsets(top: 0, left: 30, bottom: 0, right: 30)
moreStackView.isLayoutMarginsRelativeArrangement = true
}

private func setConstraints() {
Expand All @@ -85,8 +89,7 @@ class ContactsTableViewCell: UITableViewCell {
make.trailing.equalTo(contentView.safeAreaLayoutGuide)
}
call.snp.makeConstraints { make in
make.leading.equalTo(contentView.safeAreaLayoutGuide).offset(330)
make.trailing.equalTo(contentView.safeAreaLayoutGuide).offset(-30)
make.leading.equalTo(contentView.snp.leading).offset(330)
}
}

Expand All @@ -98,17 +101,7 @@ class ContactsTableViewCell: UITableViewCell {
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
moreStackView.isHidden = !selected

// invalidateIntrinsicContentSize()
// Configure the view for the selected state
}

// override func prepareForReuse() {
// invalidateIntrinsicContentSize()
// super.prepareForReuse()
// self.setNeedsLayout()
// self.layoutIfNeeded()
// }
}

// MARK: - stackview border
Expand Down
3 changes: 1 addition & 2 deletions iOS/Ringo/Ringo/TabBarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class TabBarViewController: UITabBarController{

tabBar.backgroundColor = .init(white: 1, alpha: 0.8)

// let contactsVC = UINavigationController(rootViewController: ContactsViewController())
let contactsVC = ContactsNavigationController()
let contactsVC = UINavigationController(rootViewController: ContactsViewController())
let recentsVC = RecentsViewController()
let accountVC = AccountViewController()

Expand Down

0 comments on commit bc4cf4c

Please sign in to comment.