Quantcast
Channel: Rob Bamforth's Blog
Browsing all 35 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to reset iPhone 7 (formerly power + home button)

The iPhone 7 home button is now a capacitive touch button that requires the phone to be functioning properly in order to use, it can no longer serve as a manual override during a reboot. To perform a...

View Article


Image may be NSFW.
Clik here to view.

Windows – How to free disk space by deleting previous Window(s) installations

Step 1: Click on the Windows search bar or press the start key on your keyboard, type cleanup, then select Disk Cleanup. Step 2: Click ‘Clean up System file’ Step 3: Scroll to, and select, Previous...

View Article


Image may be NSFW.
Clik here to view.

Mac OSX – Stop OS X apache service and prevent automatic running (OS X SERVER)

I already run MAMP as a local server environment for apache and MySQL, so when I installed Mac OS X Server, which runs it’s own instance of apache, my server encountered problems with MAMP which failed...

View Article

Image may be NSFW.
Clik here to view.

The Clever App Company

So here it is. After what seems like forever my business is up and running It’s been a challenge to get this far and many sacrifices have been made along the way but it feels like things are slotting...

View Article

Image may be NSFW.
Clik here to view.

JAVA – How To Bundle A Java App As An Windows Executable EXE (.jar to .exe)

This question comes up time and time again and there are two programs that I frequently use to build my compiled Java apps into a Windows Executable files. This, of course, limits the environments in...

View Article


Swift iOS – Add pinch gesture to UIImageView (imageview)

Create gesture and add it to your imageview in ViewDidLoad(): let standardPinch = UIPinchGestureRecognizer(target: self, action: #selector(pinch)) standardPinch.delegate = self...

View Article

Swift iOS – Check model, check if iPad, check if iPhone, Other

How to check device type and run specific code for iPad or iPhone. witch UIDevice.current.userInterfaceIdiom { case .phone: print("phone") case .pad: print("ipad") case .unspecified:...

View Article

Swift iOS – How to turn a positive number into a negative number, negative...

Here is a super simple method to reverse a posative or negative number in swift: func reversePosNeg(number: Int) -> Int{ return -number } Usage: let reversedNumber = reversePosNeg(number: -99)...

View Article


Swift iOS – How to detect Orientation change (landscape, portrait)

Add Notification Center observer in ViewDidLoad() NotificationCenter.default.addObserver(self, selector: #selector(orientationChange), name: UIDevice.orientationDidChangeNotification, object: nil) Add...

View Article


Image may be NSFW.
Clik here to view.

Xcode – How to install Pods (Cocoa Pods)

Xcode + developer tools must be installed on your Mac. 1. Open Terminal and run the following command to install Cocoa Pods for Xcode: sudo gem install cocoapods Enter your Mac password. The required...

View Article

Swift iOS – How to add an outline border to UISwitch

mySwitch.layer.borderColor = UIColor.lightGray.cgColor mySwitch.layer.borderWidth = 2 mySwitch.layer.cornerRadius = 15

View Article

Swift iOS – Round double to X decimal places

Simple method to trim double: func roundDouble(value: Double, decimalPlaces: Int) -> Double{ let response = Double(String(format: "%.\(decimalPlaces)f", value)) return response ?? 0.0 } Usage: let...

View Article

Swift iOS – How to keep line breaks when translating text with ML Kit on iOS

ML Kit translate is a powerful language translation tool, but when translating a passage of text containing line breaks, the returned translated text has the line breaks stripped out. I’ve tried a...

View Article


Swift iOS – How to programmatically tap UIButton

Quick and easy way to simulate UIButton tap, in code: myButton.sendActionsForControlEvents(.TouchUpInside)

View Article

Swift iOS – Remove all subviews from view

Remove all subsview from a UIView: view.subviews.forEach({ $0.removeFromSuperview() })

View Article

Browsing all 35 articles
Browse latest View live