Showing posts with label iosTips. Show all posts
Showing posts with label iosTips. Show all posts

Saturday, July 11, 2015

ioS  text replacement tip


The  is not on the iOS keyboard. It's not an official unicode character yet...On a mac you can enter option-shift-K and you easily can have one. Here is tip on how to create a  texting shortcut
http://www.cultofmac.com/295628/make-typing--iphone-easier-emoji/

Don't forget to email it to yourself. Or, some other way to upload it to your iPhone, or other  device.


http://cdn.cultofmac.com/wp-content/uploads/2014/09/AAPL.gif


Apple iOS Constraints 101

Here is a good video on doing a Hello World with constraints



Horizontal and Vertical alignment constraints:





Sunday, June 28, 2015

Swift use of optionals

In learning swift the question mark or the exclamation point and when to use them can be confusing for the beginner. I found an article that really does a good job at explaining this point.

http://www.touch-code-magazine.com/swift-optionals-use-let/
For example if those pieces of data represent an employee profile in a company database, for some records you might not know the height of the employee – in that case you shouldn’t set a value of 0 – you really should rather set the value to nothing or missing.


...


When you put a ! behind the property name you tell the compiler I don’t care that this property is optional, I know that when this code executes there always will be a value store so treat this Optional like a normal datatype. Well isn’t that nice? What would happen though if there isn’t a navigation controller to your view controller? If you suggestion that there always will be a value stored in navigationController was wrong? Your app will crash. Simple and ugly as that.


Saturday, June 27, 2015

Mobile Application Programing: iOS Lecture I

I am continuing with  Mobile programming iOS  with Matt Stoker I read some of  - Apple's Introduction to Swift.





He has developed MobileFinder/Studio

On to Week 1 demo and presentation 

Companies target iOS platforms before they do Android.

Xcode starts around the 43 minute mark

Starting with Single View Application








Right click project, show in finder

As you add files, the build phases tabs adds the files to compile:




Images.xcassets - different pixel densities

Info.plist - metatdata about the project


For now, remove story board file.


@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {


    var window: UIWindow?


class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.

    }




        window = UIWindow(frame:UIScreen.mainScreen().bounds)
        window?.makeKeyAndVisible()
        window?.backgroundColor = UIColor.greenColor()
        
        
        let lightView1 = UIView()
        lightView1.frame = CGRectMake(40.0, 50.0, 200.0, 100.0)
        lightView1.backgroundColor = UIColor.blueColor()
        window?.addSubview(lightView1)
        
        
        
        let lightSwitch = UISwitch()
        lightSwitch.frame = CGRectMake(200.0, 250.0, 100.0, 200.0)

        window?.addSubview(lightSwitch)







Screenshots

I take more screen shots than the average Joe. A picture in my mind is worth a thousand words. I have seen it so many time in technology shops that a simple screen shot will save so many back and forth email exchanges,  and possibly meetings.

With mobile phones, it is so easy to do so and once you get the hang of it, you'll find yourself sending screenshots all the time.

On a Mac , I always forget the keying sequence to do so. So here its is.



Wednesday, June 24, 2015

Rays Newsletter June edition



Yesterday, I recived Ray Wenderlich's June newsletter in my inbox. This was the same afternoon that iOS Beta 2 arrived OTA on my phone. So, I was already up and running when I saw he had a post on upgrading to iOS 9.

Likewise, he has a top ten WWDC 2015 videos.
http://www.raywenderlich.com/108816/top-10-wwdc-2015-videos


Here is a series of trainings on iOS
https://www.youtube.com/user/SkipCasts/videos

I continue learning Swift. Here is a cheat sheet
http://kpbp.github.io/swiftcheatsheet/

Sunday, June 21, 2015

Mac Basics


The course mentioned at WWDC 2015 was iOS Development in Swift by Plymouth University.

First time mac user tips Part 1
windows:

  • Minimize 
  • Maximize - hold down alt press the +, or just press it and it goes in full screen mode
  • Hide - Cmd H
Part 2
Finder - menu  at top for currently selected window

Finding applications - Finder

Applications
    -> Utilities
Cmd up arrow go back up in menu directories


Launchpad

There is search box.

Within launchpad:
  • cmd shift - A  - applications folder
  • Cmd shift  H-  Home folder
  • Cmd shift - W - dismiss window 
  • Cmd -space - spotlight search
Xcode shortcuts ( cmd , alt alternative functions, control less used)
page down cmd arrow down
page up cmd arrow up
copy cmd c
paste cmd v
cut cmd x
undo cmd z

function keys debugging
breakpoint in code
f6 step over,  if doesnt work use fn key along with key


apple menu at top - system preferences - keyboard
checkbox to not need fn button

app preferences
xcode -> preferences
downloads

simulator - cmd left arrow rotate it, see menus for simulator for more, can reset contents and get default state


multiple desktops
i.e. see documentation
applications folder -> mission control, can click plus and add additional ones
move simulator different desktops
ctrl Rt Arrow or ctrl Lft Arrow switch desktops
System preferences + hot corners

https://github.com/SoCM/iOS-FastTrack-2014-2015

copy folder into  unix terminal











Saturday, June 20, 2015

Apple Readings June 20th edition

From Apple via  ITunes U, there now exists a web site on Git Hub with course materials on teaching Swift.

Here is s sample from website http://swifteducation.github.io/assets/pdfs/XcodeKeyboardShortcuts.pdf

http://asciiwwdc.com/search?q=swift+2

An Introduction to Protocol Extensions blog post

Some commentary on Swift 2 error handling

I just upgraded to El Capitan . Here is what i can look out for.


Based on this article,  looks like iBeacons jumped the shark.


A developer blog with 18 articles so far on Swift.

XCODE7 Beta  a first of its kind allowing you to develop without the price tag :


Until the new beta came out, Apple required developers to pay to become members of Apple's Developer Program before apps could be distributed beyond the developer's local machine, or tested on physical iOS devices -- a local iOS emulator for the Mac was always available, and could be used to test apps without a developer account. While the cost was modest at $99 per year, some developers -- including those who intended to build free apps, those who were new to the process, and students or impoverished potential developers -- often balked at the cost.

The "Best of" Swift2


http://developingperspective.com/2015/06/08/0/


Magic Trackpad

The Magic Trackpad  (model number A1339) is the trackpad by apple that makes use of Apple's Multi-Touch  technology.

Scroll - two fingers
two finger swipe - go back
Switching Apps with four fingers across
control button- two fingers zoom in or out
Four fingers down - expose mode
Four fingers up - clear desktop

This video goes over features by Soldier Knows Best:






https://www.youtube.com/watch?v=GF5IPPrx17A

Sunday, June 14, 2015

Learning Swift From Scratch

I am starting my journey with Swift programming. Although, over the past few years I have dabbled a little with objective C programming and iOS. Just recently, I came across a university taught course on Mobile programming with Swift.

This course starts out with a reading assignment - Apple's Introduction to Swift.  Before I get started, I want to touch on that I am in Apple's developer program.  This now includes resources for Mac OSX, iOS, and WatchOS.  I am going to upgrade to latest version of Xcode before i get started. On the downloads page I can find they have Xcode 7 beta available which I will try out. They talk about the features including Interface Builder on the Xcode page. As well, the Swift now is at version 2.

Apple in 2004 released a book on Swift Programming Language. One more resource I came across is free book on basics from ibooks store from apple. The corresponding web site is http://swiftcenter.net/ . Lastly, an ebook on Swift you can buy.