Giter Site home page Giter Site logo

uselessfactsproject's Introduction

UselessFacts

O UselessFacts é um gerador de fatos inúteis aleatórios. Ele simplesmente gera um fato inútil aleatório por dia pra você aprender, compartilhar e rir muito com os amigos! 🤩📱

Esse projeto junta duas coisas que adoro: programação e curiosidades. Desenvolvi ele durante minha jornada no Apple Developer Academy - IFCE 🍎 e meu principal objetivo era aprender mais sobre o consumo de APIs e realizar minha primeira implementação utilizando CoreData. Através dele também tive minha primeira experiência com view code!

Captura de Tela 2023-07-29 às 17 05 56 Captura de Tela 2023-07-29 às 17 06 11

Tecnologias Utilizadas

  • CoreData
  • API de Fatos Inúteis
  • UIKit

Feedbacks e Ideias

Apesar do intuito inicial do UselessFacts ser apenas agregar conhecimento na minha jornada como desenvolvedora iOS e ter sido algo bem simples, tenho o maior apego emocional por ele! Então qualquer sugestão para melhorá-lo e/ou feedbacks são bem-vindos! ❤️

uselessfactsproject's People

Contributors

emillymaia avatar

Stargazers

Beatriz Leonel avatar

Watchers

 avatar

uselessfactsproject's Issues

Seleção de itens da TableView nos favoritos

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") else {
return UITableViewCell(style: .default, reuseIdentifier: "Cell")
}
print(favoriteFacts[indexPath.row])
var content = cell.defaultContentConfiguration()
content.text = favoriteFacts[indexPath.row]
cell.contentConfiguration = content
return cell
}

Quando eu apenas seleciono um item na table view dos favoritados, eles ficam cima, mas apenas mudam de cor e nada acontece.
Vendo teu código (que está incrivelmente organizado), entendi a única ação na tua célula da table é o swipe para deletar, entendi certo?

Se não for ter nenhuma ação na seleção de células e se você quiser retirar esse efeito cinza da seleção, pode adicionar "cell.selectionStyle = .none" na criação/configuração da tua célula. Dessa forma:

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        guard let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") else {
            return UITableViewCell(style: .default, reuseIdentifier: "Cell")
        }
        print(favoriteFacts[indexPath.row])
        var content = cell.defaultContentConfiguration()
        content.text = favoriteFacts[indexPath.row]
        cell.selectionStyle = .none
        cell.contentConfiguration = content
        return cell
}

Espero que possa te ajudar, caso seja de interesse seu. :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.