-
Notifications
You must be signed in to change notification settings - Fork 28
Lab 4 #60
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
base: master
Are you sure you want to change the base?
Lab 4 #60
Conversation
@MortyMerr добавил прямоугольник анимированный с тенью двигающийся бесконечно. Поменял немного структуру прошлых работ, добавил список из стран, из которых апи может выдать новости, добавил список избранных, поменял структуру Realm'a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Все ок, но я бы хотел немножко над стилем поработать. Ну там отступы чтобы везде были аккуратные, пробелы и так далее. А так молодец!
|
||
import Foundation | ||
|
||
final class Country { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А давай сделаем иммутабельным (let) и структурой? Это хорошая практика при хранении данных
|
||
import UIKit | ||
|
||
class CountryViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше разделять по отдельным extension, как в лекционном проекте
tableView.rowHeight = 307 | ||
} | ||
|
||
@objc func refresh(_:AnyObject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
С отступами надо поработать)
} | ||
|
||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
if (isFiltering) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Скобки не нужны
return newsCell | ||
} | ||
|
||
var isSearchBarEmpty: Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если бы был линтер, он бы попросил тебя объявлять все свойства наверху, а функции под ними. Я согласен в принципе для читаемости
|
||
shadowView.addSubview(view) | ||
self.view.addSubview(shadowView) | ||
UIView.animate(withDuration: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Молодец, что не поленился :)
@FrolovNV пофикси плз через нехочу. Для потомков сохранить хочется |
@MortyMerr , бать, все сделаю, дай только пожалуйста с курсовым закончу по джабе. А лекции все или будет последняя, сильная? |
@FrolovNV ну |
@MortyMerr вот моя помойка, помогите пожалуйста