Monday, 7 December 2015

How can I cast an NSMutableArray to a Swift array of a specific type?

You can make this work with a double downcast, first to NSArray, then to [String]:
var strings = myObjcObject.getStrings() as NSArray as [String]
Tested in a Playground with:
import Foundation

var objCMutableArray = NSMutableArray(array: ["a", "b", "c"])
var swiftArray = objCMutableArray as NSArray as [String]
Update:
In later versions of Swift (at least 1.2), the compiler will complain about as [String]. Instead you should use an if let with a conditional downcast as?:
import Foundation

var objCMutableArray = NSMutableArray(array: ["a", "b", "c"])
if let swiftArray = objCMutableArray as NSArray as? [String] {
    // Use swiftArray here
}
If you are absolutely sure that your NSMutableArray can be cast to [String], then you can use as! instead (but you probably shouldn't use this in most cases):
import Foundation

var objCMutableArray = NSMutableArray(array: ["a", "b", "c"])
var swiftArray = objCMutableArray as NSArray as! [String]

Monday, 9 November 2015

Git Source Control with Xcode


http://www.appcoda.com/git-source-control-in-xcode/

http://www.raywenderlich.com/51351/how-to-use-git-source-control-with-xcode-in-ios-7


Wednesday, 2 September 2015

Animations when developing web apps and websites

mind blowing animations when developing web apps and websites. Here is a result of some research:
Animations
http://www.smashingmagazine.com/…/the-state-of-animation-2…/
This looks good maybe:
Greensock:
http://greensock.com/
http://greensock.com/svg-tips
Animation API:
https://github.com/web-animations/web-animations-next
D3.js:
http://flowingdata.com/…/one-animated-art-piece-per-day-wi…/
https://github.com/mbostock/d3/wiki/Gallery
D3.js Book:
http://www.wowebook.org/d3-js-in-action.html



 For simple effects, you may also look into https://daneden.github.io/animate.css/.

http://julian.com/research/velocity/ has an easy to use API as well.

The good thing about these newer APIs (greensock/velocity) is that they make use of CSS animations instead of JS which is hardware accelerated hence a lot smoother.

Monday, 17 November 2014

Font Text Family New

   * Family name : Thonburi
   * Font name : Thonburi-Bold
   * Font name : Thonburi
   * Font name : Thonburi-Light
   * Family name : Khmer Sangam MN
   * Font name : KhmerSangamMN
   * Family name : Snell Roundhand
   * Font name : SnellRoundhand-Black
   * Font name : SnellRoundhand-Bold
   * Font name : SnellRoundhand
   * Family name : Academy Engraved LET
   * Font name : AcademyEngravedLetPlain
   * Family name : Marker Felt
   * Font name : MarkerFelt-Thin
   * Font name : MarkerFelt-Wide
   * Family name : Avenir
   * Font name : Avenir-Heavy
   * Font name : Avenir-Oblique
   * Font name : Avenir-Black
   * Font name : Avenir-Book
   * Font name : Avenir-BlackOblique
   * Font name : Avenir-HeavyOblique
   * Font name : Avenir-Light
   * Font name : Avenir-MediumOblique
   * Font name : Avenir-Medium
   * Font name : Avenir-LightOblique
   * Font name : Avenir-Roman
   * Font name : Avenir-BookOblique
   * Family name : Geeza Pro
   * Font name : GeezaPro-Bold
   * Font name : GeezaPro
   * Family name : Arial Rounded MT Bold
   * Font name : ArialRoundedMTBold
   * Family name : Trebuchet MS
   * Font name : Trebuchet-BoldItalic
   * Font name : TrebuchetMS
   * Font name : TrebuchetMS-Bold
   * Font name : TrebuchetMS-Italic
   * Family name : Arial
   * Font name : ArialMT
   * Font name : Arial-BoldItalicMT
   * Font name : Arial-ItalicMT
   * Font name : Arial-BoldMT
   * Family name : Marion
   * Font name : Marion-Regular
   * Font name : Marion-Italic
   * Font name : Marion-Bold
   * Family name : Menlo
   * Font name : Menlo-BoldItalic
   * Font name : Menlo-Regular
   * Font name : Menlo-Bold
   * Font name : Menlo-Italic
   * Family name : Malayalam Sangam MN
   * Font name : MalayalamSangamMN
   * Font name : MalayalamSangamMN-Bold
   * Family name : Kannada Sangam MN
   * Font name : KannadaSangamMN
   * Font name : KannadaSangamMN-Bold
   * Family name : Gurmukhi MN
   * Font name : GurmukhiMN-Bold
   * Font name : GurmukhiMN
   * Family name : Bodoni  Oldstyle
   * Font name : BodoniSvtyTwoOSITCTT-BookIt
   * Font name : BodoniSvtyTwoOSITCTT-Bold
   * Font name : BodoniSvtyTwoOSITCTT-Book
   * Family name : Bradley Hand
   * Font name : BradleyHandITCTT-Bold
   * Family name : Cochin
   * Font name : Cochin-Bold
   * Font name : Cochin-BoldItalic
   * Font name : Cochin-Italic
   * Font name : Cochin
   * Family name : Sinhala Sangam MN
   * Font name : SinhalaSangamMN
   * Font name : SinhalaSangamMN-Bold
   * Family name : Hiragino Kaku Gothic ProN
   * Font name : HiraKakuProN-W
   * Font name : HiraKakuProN-W
   * Family name : Iowan Old Style
   * Font name : IowanOldStyle-Bold
   * Font name : IowanOldStyle-BoldItalic
   * Font name : IowanOldStyle-Italic
   * Font name : IowanOldStyle-Roman
   * Family name : Damascus
   * Font name : DamascusBold
   * Font name : Damascus
   * Font name : DamascusLight
   * Font name : DamascusMedium
   * Font name : DamascusSemiBold
   * Family name : Al Nile
   * Font name : AlNile-Bold
   * Font name : AlNile
   * Family name : Farah
   * Font name : Farah
   * Family name : Papyrus
   * Font name : Papyrus-Condensed
   * Font name : Papyrus
   * Family name : Verdana
   * Font name : Verdana-BoldItalic
   * Font name : Verdana-Italic
   * Font name : Verdana
   * Font name : Verdana-Bold
   * Family name : Zapf Dingbats
   * Font name : ZapfDingbatsITC
   * Family name : DIN Condensed
   * Font name : DINCondensed-Bold
   * Family name : Avenir Next Condensed
   * Font name : AvenirNextCondensed-Regular
   * Font name : AvenirNextCondensed-MediumItalic
   * Font name : AvenirNextCondensed-UltraLightItalic
   * Font name : AvenirNextCondensed-UltraLight
   * Font name : AvenirNextCondensed-BoldItalic
   * Font name : AvenirNextCondensed-Italic
   * Font name : AvenirNextCondensed-Medium
   * Font name : AvenirNextCondensed-HeavyItalic
   * Font name : AvenirNextCondensed-Heavy
   * Font name : AvenirNextCondensed-DemiBoldItalic
   * Font name : AvenirNextCondensed-DemiBold
   * Font name : AvenirNextCondensed-Bold
   * Family name : Courier
   * Font name : Courier
   * Font name : Courier-Oblique
   * Font name : Courier-BoldOblique
   * Font name : Courier-Bold
   * Family name : Hoefler Text
   * Font name : HoeflerText-Regular
   * Font name : HoeflerText-BlackItalic
   * Font name : HoeflerText-Italic
   * Font name : HoeflerText-Black
   * Family name : Euphemia UCAS
   * Font name : EuphemiaUCAS
   * Font name : EuphemiaUCAS-Bold
   * Font name : EuphemiaUCAS-Italic
   * Family name : Helvetica
   * Font name : Helvetica-Oblique
   * Font name : Helvetica-Light
   * Font name : Helvetica-Bold
   * Font name : Helvetica
   * Font name : Helvetica-BoldOblique
   * Font name : Helvetica-LightOblique
   * Family name : Lao Sangam MN
   * Font name : LaoSangamMN
   * Family name : Hiragino Mincho ProN
   * Font name : HiraMinProN-W
   * Font name : HiraMinProN-W
   * Family name : Bodoni Ornaments
   * Font name : BodoniOrnamentsITCTT
   * Family name : Superclarendon
   * Font name : Superclarendon-Regular
   * Font name : Superclarendon-BoldItalic
   * Font name : Superclarendon-Light
   * Font name : Superclarendon-BlackItalic
   * Font name : Superclarendon-Italic
   * Font name : Superclarendon-LightItalic
   * Font name : Superclarendon-Bold
   * Font name : Superclarendon-Black
   * Family name : Mishafi
   * Font name : DiwanMishafi
   * Family name : Optima
   * Font name : Optima-Regular
   * Font name : Optima-Italic
   * Font name : Optima-Bold
   * Font name : Optima-BoldItalic
   * Font name : Optima-ExtraBlack
   * Family name : Gujarati Sangam MN
   * Font name : GujaratiSangamMN-Bold
   * Font name : GujaratiSangamMN
   * Family name : Devanagari Sangam MN
   * Font name : DevanagariSangamMN
   * Font name : DevanagariSangamMN-Bold
   * Family name : Apple Color Emoji
   * Font name : AppleColorEmoji
   * Family name : Savoye LET
   * Font name : SavoyeLetPlain
   * Family name : Kailasa
   * Font name : Kailasa
   * Font name : Kailasa-Bold
   * Family name : Times New Roman
   * Font name : TimesNewRomanPS-BoldItalicMT
   * Font name : TimesNewRomanPSMT
   * Font name : TimesNewRomanPS-BoldMT
   * Font name : TimesNewRomanPS-ItalicMT
   * Family name : Telugu Sangam MN
   * Font name : TeluguSangamMN
   * Font name : TeluguSangamMN-Bold
   * Family name : Heiti SC
   * Font name : STHeitiSC-Medium
   * Font name : STHeitiSC-Light
   * Family name : Apple SD Gothic Neo
   * Font name : AppleSDGothicNeo-Thin
   * Font name : AppleSDGothicNeo-UltraLight
   * Font name : AppleSDGothicNeo-SemiBold
   * Font name : AppleSDGothicNeo-Medium
   * Font name : AppleSDGothicNeo-Regular
   * Font name : AppleSDGothicNeo-Bold
   * Font name : AppleSDGothicNeo-Light
   * Family name : Futura
   * Font name : Futura-Medium
   * Font name : Futura-CondensedMedium
   * Font name : Futura-MediumItalic
   * Font name : Futura-CondensedExtraBold
   * Family name : Bodoni
   * Font name : BodoniSvtyTwoITCTT-Book
   * Font name : BodoniSvtyTwoITCTT-Bold
   * Font name : BodoniSvtyTwoITCTT-BookIta
   * Family name : Baskerville
   * Font name : Baskerville-Bold
   * Font name : Baskerville-SemiBoldItalic
   * Font name : Baskerville-BoldItalic
   * Font name : Baskerville
   * Font name : Baskerville-SemiBold
   * Font name : Baskerville-Italic
   * Family name : Symbol
   * Font name : Symbol
   * Family name : Heiti TC
   * Font name : STHeitiTC-Medium
   * Font name : STHeitiTC-Light
   * Family name : Copperplate
   * Font name : Copperplate
   * Font name : Copperplate-Light
   * Font name : Copperplate-Bold
   * Family name : Party LET
   * Font name : PartyLetPlain
   * Family name : American Typewriter
   * Font name : AmericanTypewriter-Light
   * Font name : AmericanTypewriter-CondensedLight
   * Font name : AmericanTypewriter-CondensedBold
   * Font name : AmericanTypewriter
   * Font name : AmericanTypewriter-Condensed
   * Font name : AmericanTypewriter-Bold
   * Family name : Chalkboard SE
   * Font name : ChalkboardSE-Light
   * Font name : ChalkboardSE-Regular
   * Font name : ChalkboardSE-Bold
   * Family name : Avenir Next
   * Font name : AvenirNext-MediumItalic
   * Font name : AvenirNext-Bold
   * Font name : AvenirNext-UltraLight
   * Font name : AvenirNext-DemiBold
   * Font name : AvenirNext-HeavyItalic
   * Font name : AvenirNext-Heavy
   * Font name : AvenirNext-Medium
   * Font name : AvenirNext-Italic
   * Font name : AvenirNext-UltraLightItalic
   * Font name : AvenirNext-BoldItalic
   * Font name : AvenirNext-Regular
   * Font name : AvenirNext-DemiBoldItalic
   * Family name : Bangla Sangam MN
   * Font name : BanglaSangamMN
   * Font name : BanglaSangamMN-Bold
   * Family name : Noteworthy
   * Font name : Noteworthy-Bold
   * Font name : Noteworthy-Light
   * Family name : Zapfino
   * Font name : Zapfino
   * Family name : Tamil Sangam MN
   * Font name : TamilSangamMN
   * Font name : TamilSangamMN-Bold
   * Family name : Chalkduster
   * Font name : Chalkduster
   * Family name : Arial Hebrew
   * Font name : ArialHebrew-Bold
   * Font name : ArialHebrew-Light
   * Font name : ArialHebrew
   * Family name : Georgia
   * Font name : Georgia-BoldItalic
   * Font name : Georgia-Bold
   * Font name : Georgia-Italic
   * Font name : Georgia
   * Family name : Helvetica Neue
   * Font name : HelveticaNeue-BoldItalic
   * Font name : HelveticaNeue-Light
   * Font name : HelveticaNeue-Italic
   * Font name : HelveticaNeue-UltraLightItalic
   * Font name : HelveticaNeue-CondensedBold
   * Font name : HelveticaNeue-MediumItalic
   * Font name : HelveticaNeue-Thin
   * Font name : HelveticaNeue-Medium
   * Font name : HelveticaNeue-ThinItalic
   * Font name : HelveticaNeue-LightItalic
   * Font name : HelveticaNeue-UltraLight
   * Font name : HelveticaNeue-Bold
   * Font name : HelveticaNeue
   * Font name : HelveticaNeue-CondensedBlack
   * Family name : Gill Sans
   * Font name : GillSans
   * Font name : GillSans-Italic
   * Font name : GillSans-BoldItalic
   * Font name : GillSans-Light
   * Font name : GillSans-LightItalic
   * Font name : GillSans-Bold
   * Family name : Kohinoor Devanagari
   * Font name : KohinoorDevanagari-Light
   * Font name : KohinoorDevanagari-Book
   * Font name : KohinoorDevanagari-Medium
   * Family name : Palatino
   * Font name : Palatino-Roman
   * Font name : Palatino-Italic
   * Font name : Palatino-Bold
   * Font name : Palatino-BoldItalic
   * Family name : Courier New
   * Font name : CourierNewPSMT
   * Font name : CourierNewPS-BoldMT
   * Font name : CourierNewPS-ItalicMT
   * Font name : CourierNewPS-BoldItalicMT
   * Family name : Oriya Sangam MN
   * Font name : OriyaSangamMN
   * Font name : OriyaSangamMN-Bold
   * Family name : Didot
   * Font name : Didot-Bold
   * Font name : Didot-Italic
   * Font name : Didot
   * Family name : DIN Alternate
   * Font name : DINAlternate-Bold
   * Family name : Bodoni  Smallcaps
   * Font name : BodoniSvtyTwoSCITCTT-Book

Wednesday, 12 November 2014

Good new iOS Guideline iPhone 6 and 6+ include


http://iosdesign.ivomynttinen.com/

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/MobileHIG/IconMatrix.html
 

Tuesday, 28 October 2014

Where Does Simulator iOS 8 Store Files



/Users/{YOUR NAME}/Library/Developer/CoreSimulator/
Devices/{DEVICE ID}/data/Containers/Data/Application/{APPLICATION ID}/
 
 
 

By Code:

        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
       
        NSLog(@"%@",basePath);

Thursday, 21 August 2014

Swift Bootcamp: Design Patterns

Swift Bootcamp: Design Patterns

Start studying design patterns using Swift. We are going to use the following resource:
http://www.wowebook.in/book/design-patterns/
http://www.scottlogic.com/blog/2014/07/24/mvvm-reactivecocoa-swift.html
http://blog.ikiapps.com/post/93914146430/mvvm-vc-swift-replacement
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html#//apple_ref/doc/uid/TP40014097-CH25-XID_402
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/AdoptingCocoaDesignPatterns.html#//apple_ref/doc/uid/TP40014216-CH7-XID_6
Note:
When building iOS apps within the traditional MVC framework, View Controllers unfortunately bear the brunt of being the de facto dumping ground for all manner of disparate functionality. As a result, they are often the biggest and most convoluted files within our iOS projects. But it doesn't have to be that way. In this session, we will learn how to unburden our View Controllers by applying the Single Responsibility Principle and delegation through functional Intentions. We’ll find that by adopting the principles of “Lighter” View Controllers our code becomes much more robust to change, yet remains easy to maintain and test.
http://360idev.com/sessions/200-cocoa-design-patterns-in-swift/
http://360idev.com/sessions/200-good-intentions-a-path-to-building-better-view-controllers/
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/AdoptingCocoaDesignPatterns.html
We are also waiting for this book:
http://www.apress.com/9781484203958
As we go along we will also review other resources.

Saturday, 14 June 2014

Swift Programming Help


Swift programming

Facebook Page:

https://www.facebook.com/groups/swift.app.dev/?fref=nf


Others Tutorials Links

http://www.appshocker.com/category/swift-tutorials-for-ios/