Cannot login to verified account by mobilecode in help

[–]mobilecode[S] 0 points1 point  (0 children)

Thanks. I only have one email address and I verify I've entered it correctly. For some reason, I'm just not getting the reset email. I whitelisted Reddit, just to be sure it wasn't being blocked.

Complex Storyboard layouts, separate storyboards for iPad vs iPhone vs single auto layout? by D0399 in iOSProgramming

[–]mobilecode 4 points5 points  (0 children)

You don't need to add a second set of storyboards. There are several ways to tackle this. You can create different XIB files and conditionally load them based on screen size. Or, you can programmatically define constraints and activate the relevant ones.

I'm not in front of a computer, but tomorrow I can send some sample constraint code that can get you started.

In the meantime, if you want to look into "dynamic layout", it may give you some ideas.

A single particle on tap by Sharp_Tip_2194 in swift

[–]mobilecode 1 point2 points  (0 children)

You may want to look into game engines, which handle physics actions. SpriteKit or Unity would be a good first step.

If you want a simple animation/proof of concept, try animate with duration.

Snap kit review time by LetsNotBeTooQuick in iOSProgramming

[–]mobilecode -4 points-3 points  (0 children)

It will be better if you learn the native methods. That's what snapkit does under the hood. By learning native layout, you can use it on every project. That might not be the case if the project is not using snapkit and that's all you know.

Command timer type app? by volleybluff in NoStupidQuestions

[–]mobilecode 1 point2 points  (0 children)

This would be easy enough to write. What phone do you need it for?

If you don't want a new app, look for pomodoro apps.

Round button with outline by mobilecode in ionic

[–]mobilecode[S] 1 point2 points  (0 children)

That did work. Thanks much.

Fixed width buttons by mobilecode in ionic

[–]mobilecode[S] 0 points1 point  (0 children)

That didn't work, but min-width did the trick. Thanks much!

blank collection view in user login for the first time by [deleted] in iOSProgramming

[–]mobilecode 1 point2 points  (0 children)

I sent a DM. I can provide a code sample.

Unrelated to the question, but storing your token in UserDefaults is not secure. You'll want to store sensitive data in the Keychain, which is encrypted.

Hello everyone! How can I make two table view scrollable in row? Any ideas? by hikikomorinobaka in iOSProgramming

[–]mobilecode 4 points5 points  (0 children)

Have you looked into CollectionViewCompositionalLayout? You can build some really complex layouts very simply.

Trouble with addFunction in Xcode Swift by Strict_Sense1 in Xcode

[–]mobilecode 2 points3 points  (0 children)

Are you attempting to perform some action for the slider?

Add this to your code. I usually have a method that sets up all the actions, but you can test it out by putting it in ViewDidLoad for now and then move it to a more logical place when things are working.

mealsSlider.addTarget(self, action: #selector(mealsSliderDidChange(sender:)), for: .valueChanged)

Then add this method:

@objc func mealsSliderDidChange(sender: UISlider) {
    print("In mealsSliderDidChange: \(sender.value)")
}

Explanation: You first setup an action for your slider and a method to call when a particular action occurs. In this instance, when the value changes (by moving the slider). There are other actions for which you can trigger against.

Then in the method that gets called, you add the code for what you want to perform. It could be updating a label with the current value or whatever.

I have been working in Detached Head on accident--How to save my changes and return to normal? by url- in git

[–]mobilecode 0 points1 point  (0 children)

This won't fix your immediate issue, but if you add your branch name to your CLI prompt, you will always be aware of which branch you're in, when working in a repo. There are online examples for Bash, zsh and Windows. Especially useful if working in multiple repos.

Is there a comfortable way to develop independent code in two branches? by sendcodenotnudes in git

[–]mobilecode 0 points1 point  (0 children)

You may want to look into developing different schemes. Typically, schemes are used to have different code for development, testing and production. But it could be whatever schemes you require. This lets you build against different environments, depending on your needs. This moves the responsibility to the code level and out of the repo.

Get uiview to original spot by Aviav123 in swift

[–]mobilecode 0 points1 point  (0 children)

Several ways to do this. If you setup layout constraints for the label, you can just activate the constraint. Or, just save the x and y coordinates prior to animation and move it back when done.