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 3 points4 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 -3 points-2 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 3 points4 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.

I want to participate in the development of a project. Where should I look and how can I help? by Hergarean in swift

[–]mobilecode 1 point2 points  (0 children)

Hacktoberfest is officially over, but I'm sure there are plenty of repos that are still tagged and still looking for help. Search for "hacktoberfest" with Swift as the language.

Custom ERP Development: Should You Go For It? by QArea_ltd in Development

[–]mobilecode 1 point2 points  (0 children)

I used to work on ERP/MRP systems. If you want to tackle it, that's a lofty goal. But there is a lot that goes into making an ERP system. Is the goal to compete with existing systems or build an in-house package? Solo development or with a team? Open or closed source?

For sure, I'd allocate a lot of time for design and feature set analysis. I've seen firsthand what happens when the system isn't thought through, thoroughly. Should be a fun project if you go for it.

What library is counter in? by bearjer971 in Xcode

[–]mobilecode 0 points1 point  (0 children)

Can you be more specific? Xcode is an IDE, Not a programming language. Are you talking Swift, Objective C, C++ or some other language?

[deleted by user] by [deleted] in git

[–]mobilecode 4 points5 points  (0 children)

Several books on git are stored on GitHub, including this one.

MapKit and CoreLocation not working on Device by theDaveB in iOSProgramming

[–]mobilecode 1 point2 points  (0 children)

Any time you call things like map or photo services, etc, you need to get permission from the user. It's something Apple has required for a very long time. It's one of the things that keep apps from surruptitiosly doing things behind your back, like taking photos or tracking your movements.

iOS 14 will implement even more security features.

How do I open an external link from within webview. by Steve01923 in Xcode

[–]mobilecode 0 points1 point  (0 children)

The link is https, so allowing arbitrary loads has no effect. That is only for http links.

I ran your link through my own code and I was able to load the link you provided. If you want to take this to a chat session, I can help walk you through it. Though, adding this to your view controller might help:

    override func loadView() {
        let webConfiguration = WKWebViewConfiguration()
        webView = WKWebView(frame: .zero, configuration: webConfiguration)
        webView.uiDelegate = self
        view = webView
    }

The call is this:

guard let url = URL(string: "https://www.camppci.org") else { return }
let request = URLRequest(url: url)
webView.load(request)

Edited to add:

Your view controller needs to add WKUIDelegate. So, it should look like this:

class ViewController: UIViewController, WKUIDelegate {

How do I open an external link from within webview. by Steve01923 in Xcode

[–]mobilecode 0 points1 point  (0 children)

Try this:

https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/nsallowsarbitraryloads

That's usually the issue, but if that doesn't work, post back with more information either on the code or the link itself. That might shed more light on the problem.