Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Vesi
Jan 12, 2005

pikachu looking at?
I don't like IB so I've just been using PureLayout, works great if you prefer to add views programmatically

If this makes intuitively sense to you then you might like it:
code:
        uidLabel.autoPinEdge(ALEdge.Left, toEdge:ALEdge.Left, ofView:self.view, withOffset:48)
        uidLabel.autoPinEdge(ALEdge.Right, toEdge:ALEdge.Right, ofView:self.view, withOffset:-48)
        uidLabel.autoPinToTopLayoutGuideOfViewController(self, withInset:18)
        uidLabel.autoSetDimension(ALDimension.Height, toSize:48)

        passwordLabel.autoPinEdge(ALEdge.Left, toEdge:ALEdge.Left, ofView:self.view, withOffset:48)
        passwordLabel.autoPinEdge(ALEdge.Right, toEdge:ALEdge.Right, ofView:self.view, withOffset:-48)
        passwordLabel.autoPinEdge(ALEdge.Top, toEdge:ALEdge.Bottom, ofView:uidLabel, withOffset:18)
        passwordLabel.autoSetDimension(ALDimension.Height, toSize:48)

        domainLabel.autoPinEdge(ALEdge.Left, toEdge: ALEdge.Left, ofView: self.view, withOffset: 48)
        domainLabel.autoPinEdge(ALEdge.Right, toEdge: ALEdge.Right, ofView: self.view, withOffset: -48)
        domainLabel.autoPinEdge(ALEdge.Top, toEdge: ALEdge.Bottom, ofView: passwordLabel, withOffset: 18)
        domainLabel.autoSetDimension(ALDimension.Height, toSize: 48)

        userImage.autoPinEdge(ALEdge.Right, toEdge: ALEdge.Left, ofView: uidLabel, withOffset: -10)
        userImage.autoAlignAxis(ALAxis.Horizontal, toSameAxisOfView: uidLabel)

        passwordImage.autoPinEdge(ALEdge.Right, toEdge: ALEdge.Left, ofView: passwordLabel, withOffset: -10)
        passwordImage.autoAlignAxis(ALAxis.Horizontal, toSameAxisOfView: passwordLabel)

        domainImage.autoPinEdge(ALEdge.Right, toEdge: ALEdge.Left, ofView: domainLabel, withOffset: -10)
        domainImage.autoAlignAxis(ALAxis.Horizontal, toSameAxisOfView: domainLabel)

        submitButton.autoSetDimension(.Height, toSize: 48)
        submitButton.autoSetDimension(.Width, toSize: 128)
        submitButton.autoAlignAxis(ALAxis.Vertical, toSameAxisOfView: domainLabel)
        submitButton.autoPinEdge(ALEdge.Top, toEdge: ALEdge.Bottom, ofView: domainLabel, withOffset: 18)

        errorLabel.autoAlignAxis(.Vertical, toSameAxisOfView: submitButton)
        errorLabel.autoPinEdge(.Top, toEdge: .Bottom, ofView: submitButton, withOffset: 18)
        errorLabel.autoSetDimension(.Height, toSize: 48)
        errorLabel.autoSetDimension(.Width, toSize: 300)

Vesi fucked around with this message at 20:23 on Jun 10, 2016

Adbot
ADBOT LOVES YOU

Vesi
Jan 12, 2005

pikachu looking at?
with fastlane I never get distribution/certificate errors anymore, maybe lucky but maybe they do the undocumented things right?

Vesi
Jan 12, 2005

pikachu looking at?

kuroshi posted:

I'm having a tough time breaking into Swift. I just tried to utilize it in a new project, but it turns out I really couldn't, as I needed to import some of my old code into it, and all of that code is in C and C++.

Is it really worth it to rewrite a sound chip emulator, a retro MIDI processor, and a MIDI file parser (including multiple obscure formats) in Swift, just so I can avoid having to write C++ to C bridges and compile them into their own frameworks for everything, just so I have some code that is no longer portable?

Audio stuff is traditionally done in c/c++ on all platforms because of how memory allocation is more predictable and you can be sure there's no locks. I recommend having just the UI and new non-audio related code in Swift.

Vesi
Jan 12, 2005

pikachu looking at?

Huckleduck posted:


let input = "new data"
self.webView!.evaluateJavaScript("drawUpdate(\(input));") { (response, error) in
print("fired eval JS, response was \(response) and error was \(error)")
}


How about :

self.webView!.evaluateJavaScript("drawUpdate('\(input)');") { ...

Vesi
Jan 12, 2005

pikachu looking at?
So every app using networking and available outside USA will require export compliance registration from BIS? I expect everyone will just lie in that part of the app submission process

Vesi
Jan 12, 2005

pikachu looking at?
it probably comes from deadline timer which fires as soon as possible after the deadline

Vesi
Jan 12, 2005

pikachu looking at?

TheReverend posted:

I can't upload to iTunes connect. Gives me this bs error of "something went wrong, try again".

Anyone else?

Been going on for 18 hours now :/

My fastlane upload was failing too, took a while to notice that itunes connect sent the error message by e-mail instead (had alpha channel in app icons)

Vesi
Jan 12, 2005

pikachu looking at?
I'll keep hooking until there's a vim mode, hopefully my ip-address doesn't explode

Vesi
Jan 12, 2005

pikachu looking at?

Plorkyeran posted:

Is "please add everything needed to implement vim emulation" sufficient? I'm not going to sink a week into trying to spec out everything that would be needed.

I just wrote

quote:

Xcode should have a vim mode in the editor, all other IDEs provide it either through plugins or natively.
https://github.com/XVimProject/XVim has sufficient functionality

just feels weird with everyone submitting their own instead of upvoting someone else's submission but as long as it works

Vesi
Jan 12, 2005

pikachu looking at?
try picker.dismiss instead of self.dismiss

also don't start vars with a capital letter, makes it look like a class

Vesi
Jan 12, 2005

pikachu looking at?
UserDefaults is fine but I guess the optimal solution would be NSUbiquitousKeyValueStore, then it'd work across devices too

Vesi
Jan 12, 2005

pikachu looking at?

ManicJason posted:

I'm also wishing there were a way to hit a web hook when a build finishes processing and hits TestFlight. I can use another dummy email address for that, but yeck.

With fastlane this is easy

Vesi
Jan 12, 2005

pikachu looking at?
I tried with one of my barbuttons and it worked as expected

code:
    func underlineIcon(image: UIImage) -> UIImage {
        UIGraphicsBeginImageContext(image.size)
        defer {
            UIGraphicsEndImageContext()
        }
        let rect = CGRect(origin: CGPoint.zero, size: image.size)
        image.draw(in: rect)
        #imageLiteral(resourceName: "ic_underline").draw(in: rect, blendMode: CGBlendMode.normal, alpha: 1.0)
        ("foo" as NSString).draw(in: rect, withAttributes: nil)
        return UIGraphicsGetImageFromCurrentImageContext()!
    }
edit: vv thanks, totally forgot about defer

Vesi fucked around with this message at 01:03 on Mar 21, 2017

Vesi
Jan 12, 2005

pikachu looking at?
put it in a asset catalog

Vesi
Jan 12, 2005

pikachu looking at?
That does look nasty indeed, can you call reloaddata in select and deselect instead so you can handle all cell drawing in cellForRowAt?

Vesi
Jan 12, 2005

pikachu looking at?

dc3k posted:

oh drat I didn't even think about that. Every time I switch to a machine without xvim installed I end up writing gibberish all over my files for a while until I get used to it :(

don't I knpxaow that feeling

Vesi
Jan 12, 2005

pikachu looking at?
fastlane also has increment_build_number but maybe you have a reason for incrementing it even when just testing with devices/simulators?

Vesi
Jan 12, 2005

pikachu looking at?
my 12.4 is only 15G on the M1, but I installed it with xcode-install, maybe it's different

Vesi
Jan 12, 2005

pikachu looking at?

smackfu posted:

You would think Apple would hire good developers and then train them in iOS details vs expecting people to be iOS experts in areas that no one outside Apple is too concerned about.

I guess everyone wants to work for Apple though so you can hire whoever you want.

maybe it's like with those exclusive clubs, you have to know someone who's already in (to give you hints on what gotchas to look out for)

or you end up repeating the process so many times the sunk cost will make you appreciate the job more and demand less

Vesi
Jan 12, 2005

pikachu looking at?
revoke your certificates and let xcode re-create them

I feel your pain, I think I've wasted weeks of my life just to fight apple certificates but in recent years revoke has never failed me

Vesi
Jan 12, 2005

pikachu looking at?
"everyone" is using declarative style for UIs now, flutter, react, jetpack compose, qt qml

Vesi
Jan 12, 2005

pikachu looking at?
I use flutter for iOS stuff now even if we don't always need android, xcode is there just for setting up the devices and ipa upload

Adbot
ADBOT LOVES YOU

Vesi
Jan 12, 2005

pikachu looking at?

duck monster posted:

How are you finding flutter? I grabbed one of those Udemy courses, but the instructors english is so poor and shouty its extremely hard to follow. The ios dev at work uses it and it *looks* like a decent system (I was rather impressed at some system he had in there that could straight up execute gherkin behavior specs as tests) but before investing too hard in learning it I really need to figure out if its a smart path to go down.

I've been using it for 5 years with multiple projects and no complaints, it's my favourite way of doing UI code now, pixel-perfect 120fps performance too unlike other cross-platform kits, and there's 3rd party plugins for almost everything platform-specific, google seems committed to supporting it too

the iOS styled widgets are google-made imitations of the actual iOS widgets which can throw off some purists and I'm not sure if desktop and web are production ready yet, but with mobile I can develop on android and be 100% certain it'll work the same way on iOS

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply