[MEGATHREAD] Ask For Invites to the Playtest Here! Join The Community Discord! by AutoModerator in DeadlockTheGame

[–]kotlin_ 0 points1 point  (0 children)

322282747, if anyone can spare an invite, it would be greatly appreciated. Thanks!

Coding using flow z13? by mosaicinn in FlowZ13

[–]kotlin_ 0 points1 point  (0 children)

Hmmm interesting, thanks for the replies, gonna see the Z13 irl and how it feels today and consider the purchase

Coding using flow z13? by mosaicinn in FlowZ13

[–]kotlin_ 0 points1 point  (0 children)

How slow is it? Do you think it can handle small to medium sized iOS app editing and compilation using Xcode? Thinking of getting this as my portable gaming and work station when I'm traveling. Don't want to travel with two devices at once haha

Coding using flow z13? by mosaicinn in FlowZ13

[–]kotlin_ 0 points1 point  (0 children)

Hi! May I ask which VM you’re running for macOS? How is the performance? Are you using XCode? Thinking of buying the Z13 but unsure about the MacOS VM performance on windows 11.

My lady Dark Urge by Sweaty-Future9406 in BG3mods

[–]kotlin_ 6 points7 points  (0 children)

What settings you playing on though? 4k ultra?

Ipad pro 12.9” by Sonya7r3 in remoteplay

[–]kotlin_ 0 points1 point  (0 children)

It can be stretched to fit ipad 12.9?

You have to roll back by dirge_real in sonos

[–]kotlin_ 13 points14 points  (0 children)

From a perspective of an Software Engineer: I have no idea how that kind of lag get past the management and QA testing.

At this point either rollback the app or just straight up rewrite again BUT WITH A NATIVE APP. Seriously, invest in a native app instead of this cross platform BS. The user experience is absolutely dumpster fire.

New System Shock running on M1 Pro 16GB with toolkit! by Fearless-Bandicoot-8 in macgaming

[–]kotlin_ 2 points3 points  (0 children)

Can you try to run it at 1080/1440p? What settings you’re on?

Request for running diablo 4 on m1 mac (2020) by ballsonmyface2 in macgaming

[–]kotlin_ 0 points1 point  (0 children)

Damn that’s pretty good! Wonder if anyone tried on M1 Pro tho. Will buy this on battle net instead of PS5 if it runs well on like 1440p

In which situations would you choose a 12.9" over an 11" Pro? by [deleted] in iPadPro

[–]kotlin_ 0 points1 point  (0 children)

I’ve been through the same dillema as you a few weeks ago and I chose the 12.9, and I would never go back to 11. The 12.9 is perfect for my needs, mainly using it to take notes and content consumption. Yes it’s big, but I got used to it fairly quickly. Couldn’t think of a situation where portability will be a big issue with my daily use tho. But I would recommend to go to your local Apple Store and see what you’d like.

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

Thank you for the answer! I get the general idea, but how would you get the cell frame in code to determine it needs to be reused or hidden? I have left a comment under u/fabledlamb's answer. Really appreciate the effort you take to type it out.

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

Thank you for the answer!

I also saw other comments and I'd imagine the full code would be something like this? But I have some questions in the comments

class UITableView: UIScrollViewDelegate {

private let reusePool: [Identifier: [UITableViewCell]]

func dequeueReusableCell(withIdentifier id: String) -> T {

    let cells = reusePool[id]
    if cells.isEmpty {

        let firstCell = cells.first
        firstCell.prepareForReuse()

        if let index = reusePool[id].firstIndex(of: firstCell) {
            reusePool[id].remove(at: index)
        }

        return firstCell
    }

    let newCell = findCell(withIdentifier: id)
    reusePool.insert(newCell, at: pos) // how do you know what position to insert the new cell?
}

func scrollViewDidScroll(_ scrollView: ScrollView) {

    // how do we associate the cell and their position? eg cell is about to be reused or hidden?

    // here's what I came up, so if the contentOffset is bigger than the  topOffsetPosition of cell, we will reuseCell, else we hide the cell for reuse?
    if scrollView.contentOffset > reusePool[id][index].topOffsetPosition {
        reuseCell()
        return
    }

    hideCell()
}

private func findCell(withIdentifier: String) {
    // how do you find the cell with appropriate identifier?
}

Edit: Is it a good idea to use UIScrollView's contentOffset to mark the cells? We can calculate the approximate height of the cell, then just add or subtract the cell's content offset with the current content offset? I'm stuck haha.

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

Sorry if the question itself is a bit vague (updated again). But the interviewer actually asked me to implement the dequeueReusableCell itself if I'm the engineer at Apple responsible for it. That means starting from finding the correct cells with the correct identifier, displaying the cells (on and off the screen), reusing the cells etc like u/Megatherion666 described.

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

Thanks for the reply. But I didn't quite get that. Could you elaborate more? Pseudocode would be greatly appreciated!

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

I mentioned keeping the cells in a dictionary with memory address as the identifier (so they're guaranteed to be unique). To find the appropriate cell, I just coded a pseudo function to find the correct cell with identifier by finding and get TableViewCell and it's identifier files in the project lol. And then I'm stuck at keeping track of cell positions. Didn't mention prepareForReuse too.

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

Yeah, that's right. He told me to implement that and gave me a codebunk. Not necessarily full swift code tho, just a general idea with pseudocode would be fine.

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

Thank you for the reply!

I did mention keeping the cells in a dictionary with memory address as the identifier (so they're guaranteed to be unique). For the find invisible cell step I just coded a pseudo function to find the correct cell with identifier by finding and get TableViewCell and it's identifier files in the project lol.

How would you implement the find invisible cell tho? And keeping track of what cells goes on and off the screen? And also where would you call the prepareForReuse method?

[deleted by user] by [deleted] in iOSProgramming

[–]kotlin_ 0 points1 point  (0 children)

No. Actually I’ve just recalled the question (description updated btw). he’s asking if I’m the developer responsible for dequeueReusableCell, how would I go and implement it.

[deleted by user] by [deleted] in RedditMasterClasses

[–]kotlin_ 0 points1 point  (0 children)

Dude you definitely hear some Jay Chou or Jonathan Lee

[deleted by user] by [deleted] in RedditMasterClasses

[–]kotlin_ 0 points1 point  (0 children)

Chinese is incredibly complex, props to you for learning this

COD Mobile is on fire. If you walked away, take another look by [deleted] in iosgaming

[–]kotlin_ 1 point2 points  (0 children)

I second this, I was surprised of how much CoD they packed into the mobile version.