This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
creationComplete="view1_creationCompleteHandler(event)" xmlns:views="views.*" | |
> | |
<fx:Script> | |
<![CDATA[ | |
import mx.collections.ArrayCollection; | |
import mx.events.FlexEvent; | |
[Bindable] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:IconItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark"> | |
<fx:Metadata> | |
[Event(name="checkBoxIconItemRendererChanged", type="flash.events.Event")] | |
</fx:Metadata> | |
<fx:Script> | |
<![CDATA[ | |
import spark.components.CheckBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SplashViewController.swift | |
// splashAnimation | |
// | |
// Created by Burhan Aksendir on 26.03.2015. | |
// Copyright (c) 2015 Aksendir. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBAction func shareFacebook(sender: AnyObject) { | |
if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook){ | |
var facebookSheet: SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook) | |
facebookSheet.setInitialText("Demo") | |
self.presentViewController(facebookSheet, animated: true, completion: nil) | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//declare closure outsize class definition (above class definition) | |
typealias CompletionHandler = (success:Bool!) -> Void | |
//declare library variable inside class | |
var library:ALAssetsLibrary? | |
//initialize variable in viewDidLoad | |
library = ALAssetsLibrary(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// Parse initialization | |
Parse.setApplicationId(“xxxxxxxxxxxxxxxx", clientKey: “xxxxxxxxxxxxx") | |
let types = UIUserNotificationType.Badge | UIUserNotificationType.Alert | UIUserNotificationType.Sound | |
let settings = UIUserNotificationSettings(forTypes: types, categories: nil) | |
application.registerUserNotificationSettings(settings) | |
return true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewDidLoad() { | |
super.viewDidLoad() | |
NSNotificationCenter.defaultCenter().addObserver(self, selector: "remoteNotificationReceiveAction:", name: "remoteNotificationReceived", object: nil) | |
} | |
func remoteNotificationReceiveAction(data: NSNotification) { | |
if let apsPayloadContent: AnyObject = data.userInfo as? AnyObject { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func remoteFileExists(url: String) -> Bool { | |
var exists: Bool = false | |
let url: NSURL = NSURL(string: url)! | |
var request: NSMutableURLRequest = NSMutableURLRequest(URL: url) | |
request.HTTPMethod = "HEAD" | |
var response: NSURLResponse? | |
NSURLConnection.sendSynchronousRequest(request, returningResponse: &response , error: nil) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BookViewController: UIViewController { | |
var book: UIView! | |
var content: NSMutableArray! | |
var currentPage: Int = 0 | |
var font: UIFont! | |
override func viewDidLoad() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let gearTitle = NSString(string: "\u{2699}") as String | |
let fontStyle = [NSFontAttributeName: UIFont(name: "Avenir Next", size: 27)!] | |
let settingsButton = UIBarButtonItem(title: gearTitle, style: UIBarButtonItemStyle.Plain, target: self, action: Selector("showSettingsVC:")) | |
settingsButton.setTitleTextAttributes(fontStyle, forState: UIControlState.Normal) |
OlderNewer