o9s
is a microblog
home archives search feed blogroll


Latest posts:

setHighlighted on UILabels

setHighlighted exists for UILabels, you can override it, but it does nothing. Here’s how to make it work.

- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
    [super touchesBegan:touches withEvent:event];
    [self setHighlighted:YES];
}

 - (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {
     [super touchesEnded:touches withEvent:event];
     [self setHighlighted:NO];
 }
 
 - (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event {
     [super touchesMoved:touches withEvent:event];
     [self setHighlighted:NO];
 }

 - (void)setHighlighted:(BOOL)highlighted {
    [super setHighlighted:highlighted];
 
    // Custom implementation
 }
Posted on 2018-10-02   #objc     #ios  


TestFlight Public Links

Apple has released a new feature on TestFlight for easier tester acquisition. You can now create public links for your builds. Testers will just have to click on the link and they will be able to install your beta. No more dealing with the annoying management of testers and email addresses.

  1. Upload an archive to ItunesConnect.
  2. Go to ItunesConnect.
  3. Choose your app from the menu.
  4. Go to the TestFlight tab.
  5. Go to External Testers.
  6. Go to the Build tab.
  7. Add a build. Follow the instructions.
  8. Submit your build for review. Apple will review your build. It takes some time.
  9. Once it’s approved, go to the Testers tab. There’s your public link.
Posted on 2018-09-28   #ios  


A Cryptic Way To Join

Instead of writing arr.join(' '), it’s possible to write arr * ' '. That’s it, I think it’s cool.

Posted on 2018-06-07   #ruby  


Shortfizz

My 65 characters fizzbuzz implementation. It’s not the prettiest, but it checks all the boxes.

for(i=0;i<101;i++)console.log((i%3?'':'Fizz')+(i%5?'':'Buzz')||i)
Posted on 2018-05-23   #javascript  


Toggle Soft Keyboard In iOS Emulators

cmd+K

How did I not know that? I always tested the keyboard showing up and dismissing properly with a real device.

Posted on 2018-05-09   #ios  


Next page →
Page 1 of 32