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

searchDisplayController 在ios8中被弃用后用什么替代呢? #3

Open
x1911 opened this issue May 11, 2015 · 1 comment
Open

Comments

@x1911
Copy link

x1911 commented May 11, 2015

非常感谢大大无私的奉献,让我学到很多东西,在此有两个小疑问想问问

在课件提到的两个地方
1,
contentOffset.y += searchDisplayController!.searchBar.frame.size.height

2,
func searchDisplayController(controller: UISearchDisplayController, shouldReloadTableForSearchString searchString: String!) -> Bool {
fliteredTodos = todos.filter(){$0.title.rangeOfString(searchString) != nil}
return true
}

都提示 searchDisplayController 和 UISearchDisplayController 在IOS8 中被弃用,这里应该如何修改呢?

谢谢大大

@JakeLin
Copy link
Owner

JakeLin commented May 11, 2015

请使用UISearchController,但是要支持iOS
7的话需要注意一下,我的做法是iOS9出来时,我的app只支持iOS8,然后把这些API都升级。

谢谢
Jake

2015-05-11 17:28 GMT+10:00 x1911 notifications@github.com:

非常感谢大大无私的奉献,让我学到很多东西,在此有两个小疑问想问问

在课件提到的两个地方
1,
contentOffset.y += searchDisplayController!.searchBar.frame.size.height

2,
func searchDisplayController(controller: UISearchDisplayController,
shouldReloadTableForSearchString searchString: String!) -> Bool {
fliteredTodos = todos.filter(){$0.title.rangeOfString(searchString) != nil}
return true
}

都提示 searchDisplayController 和 UISearchDisplayController 在IOS8
中被弃用,这里应该如何修改呢?

谢谢大大


Reply to this email directly or view it on GitHub
#3.

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

No branches or pull requests

2 participants