Skip to content

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

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

Conversation

FrolovNV
Copy link

@MortyMerr вот моя помойка, помогите пожалуйста

@FrolovNV
Copy link
Author

FrolovNV commented May 5, 2020

@MortyMerr добавил прямоугольник анимированный с тенью двигающийся бесконечно. Поменял немного структуру прошлых работ, добавил список из стран, из которых апи может выдать новости, добавил список избранных, поменял структуру Realm'a

Copy link
Collaborator

@M0rtyMerr M0rtyMerr left a 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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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 {
Copy link
Collaborator

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,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Молодец, что не поленился :)

@M0rtyMerr
Copy link
Collaborator

@FrolovNV пофикси плз через нехочу. Для потомков сохранить хочется

@FrolovNV
Copy link
Author

@MortyMerr , бать, все сделаю, дай только пожалуйста с курсовым закончу по джабе. А лекции все или будет последняя, сильная?

@M0rtyMerr
Copy link
Collaborator

@FrolovNV ну

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

Successfully merging this pull request may close these issues.

2 participants