Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gayson 吉训振 #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Gayson 吉训振 #7

wants to merge 4 commits into from

Conversation

JiXunzhen
Copy link

No description provided.

@JiXunzhen
Copy link
Author

版本修订,解决了爆炸bug

@JiXunzhen
Copy link
Author

删掉了一点无用文件

@yimingtang yimingtang added the ios label Jul 4, 2017
@yimingtang yimingtang changed the title error版本,如果允许的话一会发起一个新的request 金屹梵 Jul 4, 2017
@JiXunzhen JiXunzhen changed the title 金屹梵 Gayson 吉训振,error版本,如果允许的话一会发起一个新的request Jul 4, 2017
@JiXunzhen JiXunzhen changed the title Gayson 吉训振,error版本,如果允许的话一会发起一个新的request Gayson 吉训振 Jul 4, 2017
@yimingtang
Copy link
Member

可以可以,差点弄错名字了 🥇

@yimingtang
Copy link
Member

yimingtang commented Jul 4, 2017

screen shot 2017-07-04 at 6 11 48 pm

screen shot 2017-07-04 at 6 14 16 pm

工程索引有问题,没法运行哦~

import UIKit

class NoteDetailController: UIViewController {
@IBOutlet weak var context: UITextView!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

命名不好,原意是上下文。建议改成 textView

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其实是想写成content然后打错了就一直让他错着了

@yimingtang
Copy link
Member

  1. 工程索引有问题,所以没法编译;
  2. 帮你改了一下,能跑,基本功能尚可吧;
  3. 详情页面接口设计还需要改进;
  4. 命名和书写还不够规范。


protocol NoteDetailDelegate {
func newNote(content: String)
func modifyNote(content: String, indexPath: IndexPath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几个方法里要传 indexPath 不合理。不能假定自己是被列表唤起的吧。

@IBOutlet weak var delete: UIButton!

var status: OpenStatus?
var indexPath: IndexPath?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

依赖 indexPath 不合理,假定自己的调用者是列表了。直接持有一个 Note 对象得了。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一开始是觉得会方便一点,后面发现其实并没有太多用处

let cellNib = UINib(nibName: "NoteItem", bundle: nil)
noteListView.register(cellNib, forCellReuseIdentifier: "noteItem")

noteListView.delegate = self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果你大量用 Storyboard 为什么不全用 SB 设置?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对storyboard如何单独设计一个viewcell不太熟悉,所以用了xib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants