Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
修复屏幕旋转时附加工具和设置页列表的背景色发生错位的问题
Browse files Browse the repository at this point in the history
backgroundView2:UIView在附加工具和设置页中并不能自动随屏幕旋转而调整大小,已使用坐标赋值的方式进行适应。
  • Loading branch information
kagurazakayashi committed Jun 20, 2015
1 parent 6be4a15 commit ed0b14b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Binary file not shown.
9 changes: 7 additions & 2 deletions CloudEmoticon2iOS/AddonTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,20 @@ class AddonTableViewController: UITableViewController {
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "切换主题", name: "切换主题通知", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "屏幕旋转", name: "屏幕旋转通知", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "屏幕旋转:", name: "屏幕旋转通知", object: nil)
切换主题()
}

override func viewDidAppear(animated: Bool) {
self.tableView.reloadData()
}

func 屏幕旋转() {
func 屏幕旋转(通知:NSNotification) {
let 新坐标:NSArray = 通知.object as! NSArray
let :CGFloat = 新坐标.objectAtIndex(0) as! CGFloat
let :CGFloat = 新坐标.objectAtIndex(1) as! CGFloat
let backgroundView2:UIView = self.tableView.backgroundView?.subviews[0] as! UIView
backgroundView2.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y,,)
刷新背景图()
}

Expand Down
9 changes: 7 additions & 2 deletions CloudEmoticon2iOS/SetTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,20 @@ class SetTableViewController: UITableViewController {
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "切换主题", name: "切换主题通知", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "屏幕旋转", name: "屏幕旋转通知", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "屏幕旋转:", name: "屏幕旋转通知", object: nil)
切换主题()
}

override func viewDidAppear(animated: Bool) {
self.tableView.reloadData()
}

func 屏幕旋转() {
func 屏幕旋转(通知:NSNotification) {
let 新坐标:NSArray = 通知.object as! NSArray
let :CGFloat = 新坐标.objectAtIndex(0) as! CGFloat
let :CGFloat = 新坐标.objectAtIndex(1) as! CGFloat
let backgroundView2:UIView = self.tableView.backgroundView?.subviews[0] as! UIView
backgroundView2.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y,,)
刷新背景图()
}

Expand Down

0 comments on commit ed0b14b

Please sign in to comment.