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

Commit246e579

Browse files
committed
优化横竖屏和iPad体验
1 parentbb21578 commit246e579

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

‎iLeetcode/iLeetcode/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.1.0</string>
20+
<string>2.2.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>2019.04.23.02</string>
22+
<string>2019.04.25</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>NSAppTransportSecurity</key>

‎iLeetcode/iLeetcode/View/IHTCShareFooterView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class IHTCShareFooterView: UIView {
3939
fview.shareImage.image= image
4040
fview.shareTitle.text= title
4141
fview.shareSubTitle.text= subTitle
42+
ifUIDevice.current.userInterfaceIdiom==.pad{
43+
fview.shareTitle.font=UIFont.systemFont(ofSize:21)
44+
fview.shareSubTitle.font=UIFont.systemFont(ofSize:16)
45+
}
4246
return fview
4347
}
4448

‎iLeetcode/iLeetcode/ViewController/ITProgrammerVC.swift

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ class ITProgrammerVC: UIViewController {
3434

3535
// MARK:- 懒加载
3636
lazyvartableView:UITableView={
37-
vartableView=UITableView.init(frame:CGRect.init(x:0, y:0, width: kScreenW, height: kScreenH-49), style:.grouped)
37+
vartableView=UITableView.init(frame:CGRect.zero, style:.grouped)
3838
tableView.contentInset=UIEdgeInsets.init(top:0, left:0, bottom:-49, right:0)
3939
tableView.sectionFooterHeight=0.1;
4040
tableView.estimatedRowHeight=55
41+
tableView.translatesAutoresizingMaskIntoConstraints=false
42+
tableView.delegate=self
43+
tableView.dataSource=self
4144
return tableView
4245
}()
4346

@@ -52,8 +55,16 @@ extension ITProgrammerVC
5255
{
5356
func setupUI(){
5457
view.addSubview(tableView)
55-
tableView.delegate=self
56-
tableView.dataSource=self
58+
letconstraintViews=[
59+
"tableView": tableView
60+
]
61+
letvFormat="V:|-0-[tableView]-0-|"
62+
lethFormat="H:|-0-[tableView]-0-|"
63+
letvConstraints=NSLayoutConstraint.constraints(withVisualFormat: vFormat, options:[], metrics:[:], views: constraintViews)
64+
lethConstraints=NSLayoutConstraint.constraints(withVisualFormat: hFormat, options:[], metrics:[:], views: constraintViews)
65+
view.addConstraints(vConstraints)
66+
view.addConstraints(hConstraints)
67+
view.layoutIfNeeded()
5768
}
5869

5970
overridevarprefersStatusBarHidden:Bool{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp