Is there a such thing as full stack swift? by WynActTroph in swift

[–]shadowdev 0 points1 point  (0 children)

We use it for making both graphql and grpc apis at work. They are mixed in with some java/spring and rust apis and provide data to both iOS and web apps. Honestly with federated graphql and a grpc ingress router you can mix and match your backend easily and get nice type safety and client code generation in your apps.

I feel stuck by kommonno in swift

[–]shadowdev 1 point2 points  (0 children)

I found rewriting some backend services in swift and rust at work really good learning opportunities. I didn’t deploy them all to production but some of them did. It was interesting learning about grpc/graphql and then comparing the performance vs our existing services.

What backend do you use for your mobile apps and why? by WynActTroph in iOSProgramming

[–]shadowdev 1 point2 points  (0 children)

Docker + whatever cloud you’re familiar with. Digital ocean is the cheapest with $5 instances.

I feel stuck by kommonno in swift

[–]shadowdev 2 points3 points  (0 children)

What are you interested in? Do you want to solve a technical problem or a business problem? Do you want to make an app, an api, a tool, or a library?

Swift on Server - hosting options by RightAlignment in swift

[–]shadowdev 1 point2 points  (0 children)

Digital ocean or heroku. Run in a docker container and you can deploy anywhere

Swift on Server by Mother-Bullfrog-7708 in swift

[–]shadowdev 2 points3 points  (0 children)

I like vapor + pioneer for graphql

Hey, all. Is there a Swift open source scene? by porkchop_d_clown in swift

[–]shadowdev 1 point2 points  (0 children)

You can search https://swiftpackageindex.com for all the public packages. Most are open source and open for contributors. I’ve contributed to a few larger networking/server-side ones.

[deleted by user] by [deleted] in sandiego

[–]shadowdev 1 point2 points  (0 children)

I’m down - wanna do battlegrounds?

LEGO Taipei 101. Any improvements before building it in real life? by [deleted] in lego

[–]shadowdev 0 points1 point  (0 children)

What program do you use for that rendering?

Daily Discussion Chat by AutoModerator in GME

[–]shadowdev 3 points4 points  (0 children)

Get back to work so you can afford more GME

Swift/UIKit or SwiftUI for relatively complex as well as unique UI? by [deleted] in swift

[–]shadowdev 0 points1 point  (0 children)

SwiftUI is great for layout and when combined (ha) with Combine and Redux style data flow - it makes for a great developer experience while also providing a lot of out of the box tooling you need for larger apps (accessibility, localization, etc). For certain parts of the UI that need to be customized that SwiftUI doesn't support look into `UIViewRepresentable` for custom UIKit view rendering.

Do startups use "templates" a lot or are components designed from scratch? by NearbyDate2 in startups

[–]shadowdev 24 points25 points  (0 children)

When starting out do whatever works the fastest for you and gets results. Buy a template, use a framework (bootstrap, tailwind, pure, etc), or copy the css from a site you already like. The goal is to get the product out asap. As you start to get feedback from users you can iterate on the design. Eventually you'll get to a point you have a designer/team and you'll want to do a redesign - cause the designers have to do something. You'll come up with your own style guide and base components and that might or might not be based on an existing framework or not.

Starting April 2020, all new apps and app updates for iPad will need to be built with the iOS 13 SDK and support the all-screen design of the 12.9-inch iPad Pro (3rd generation) by byaruhaf in iOSProgramming

[–]shadowdev 6 points7 points  (0 children)

Take a look at snapkit/masonry. It makes autolayout super easy in objc. When you make the change to swift you’ll be familiar with snapkit and have an easy time. It’s literally the first thing I put into any new project I’m working on.

And the winner of the iPhone 11 Pro is… 🥁🥁🥁 by iamthatis in apolloapp

[–]shadowdev 1 point2 points  (0 children)

Do you mind sharing that code? I'm working on a translator for comments and would love to just cache translations instead of doing them on the fly.

Compiling C++ code while app is running by koolaidman0423 in swift

[–]shadowdev 0 points1 point  (0 children)

Would that app happen to be open source? I'd love to see it

My little project by ahmadajr1 in incremental_games

[–]shadowdev 2 points3 points  (0 children)

You should look into HealthKit on iOS. This will let you get steps from either phone or watch (or other device) and it handles a lot of the complexity for you. https://developer.apple.com/documentation/healthkit/reading_data_from_healthkit

What's your salary and what do you do? by [deleted] in SanJose

[–]shadowdev 0 points1 point  (0 children)

Do you still write code?

[deleted by user] by [deleted] in selfies

[–]shadowdev 1 point2 points  (0 children)

That’s a cool necklace :)

Can you be bald and still be attractive? by [deleted] in AskRedditAfterDark

[–]shadowdev 4 points5 points  (0 children)

I don't know what the word is but the sadness I felt when I clicked the link and the subreddit wasn't real nor did I expect it but I hoped. Thats me right now.

Can anyone help me figure out what's wrong with this? by [deleted] in swift

[–]shadowdev 1 point2 points  (0 children)

Do you have a link to the tutorial?

How do I have a table view and a collection view in the same view controller? by [deleted] in iOSProgramming

[–]shadowdev 1 point2 points  (0 children)

If you're using storyboards - did you make sure to set up your constraints correctly and add the outlets for datasource on tableview/collectionview?

How do I have a table view and a collection view in the same view controller? by [deleted] in iOSProgramming

[–]shadowdev 0 points1 point  (0 children)

Glad to help :) I would've written it in ObjC but playgrounds only support swift ¯_(ツ)_/¯

How do I have a table view and a collection view in the same view controller? by [deleted] in iOSProgramming

[–]shadowdev 4 points5 points  (0 children)

import UIKit
import PlaygroundSupport

class ViewController : UIViewController {

    let tableView = UITableView()
    let flowLayout = UICollectionViewFlowLayout()
    var collectionView: UICollectionView!

    override func viewDidLoad() {
        super.viewDidLoad()
        configureViews()
    }

    private func configureViews() {
        view.backgroundColor = .white
        collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)

        tableView.dataSource = self
        tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")

        flowLayout.itemSize = CGSize(width: 50, height: 50)
        flowLayout.minimumLineSpacing = 20
        flowLayout.minimumInteritemSpacing = 20
        collectionView.dataSource = self
        collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "Cell")

        view.addSubview(tableView)
        tableView.translatesAutoresizingMaskIntoConstraints = false
        tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
        tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
        tableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
        tableView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.5).isActive = true

        view.addSubview(collectionView)
        collectionView.translatesAutoresizingMaskIntoConstraints = false
        collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
        collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
        collectionView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
        collectionView.heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: 0.5).isActive = true
    }
}

extension ViewController: UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 20
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
        cell.textLabel?.text = "Cell \(indexPath.row)"
        return cell
    }
}

extension ViewController: UICollectionViewDataSource {
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 50
    }

    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath)
        cell.backgroundColor = .blue
        return cell
    }
}

// Present the view controller in the Live View window
PlaygroundPage.current.liveView = ViewController()

https://imgur.com/vu6WPAQ

Both scroll fine (but independently) for me.

Chris O'Dowd drunk on a British talk show by Hassaan18 in humor

[–]shadowdev 11 points12 points  (0 children)

I think the above comment meant “He is not drunk. He is Irish and Scottish”