Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 8:39 am on October 3, 2014 Permalink | Reply
    Tags: , ,   

    How to change the Git user pictures in Xcode 

    Source-Control

    Those little avatars / user pictures in Xcode are linked to your Mac Contacts. This is not a Git or SVN feature.

    You can associate a Mac Contact with a committer in Xcode and make it show up under Source Control – History. If the contact has a picture and you associate that contact with a Git committer then Xcode will show it in History. Here’s how it works in Xcode 6:

    • in Source Control – History, hover over the name of the committer
    • click on that super teeny tiny disclosure triangle
    • from the drop down menu, select Add to Contacts
    • you can now create a new contact, including a picture, or “Choose existing” and pick a contact
    • confirm your choice and the icon shows up in your project

    Xcode isn’t clever enough to apply the same committer contact to all your projects so you need to repeat this process for each project.

    In the same manner you can replace and update contacts.





     
  • Jay Versluis 11:17 am on September 18, 2014 Permalink | Reply
    Tags: iOS 8   

    What’s New in iOS 8 

    iOS-8-IconEven though us developers get access to new versions of iOS, it doesn’t mean that Apple actually tell us what’s new in a release. iOS 8 is no exception.

    When you upgrade on your device there’s a handy “Learn More” link that gives you a summary of the new features. I wish this was accessible to developers when the first beta comes out. Perhaps one day it will be, or it always has been and I’ve always missed the link.

    Until such time, here’s what’s new in iOS 8 (without the marketing hype):

    This update contains hundreds of new features, including the following:

    • Messages improvements
    • Tap to Talk to send your voice, a video or a photo with just a swipe
    • Group messaging options to name a conversation, add a contact, remove a contact, or leave a conversation
    • New details view with Do Not Disturb, location sharing and attachments view

    Photos improvements

    • Smart editing tools to adjust light and color with a swipe
    • Fine-tune controls to adjust exposure, brightness, contrast, highlights, shadows and more
    • Search by date, location, or album name or use smart suggestions
    • Smart albums for Slo-mo videos, Bursts, Panoramas, and Time-lapse
    • Third-party photo filters and editing tools supported directly in Photos
    • Your photos and metadata from iPhoto will be migrated to Photos. Books, Journals and Slideshows will be converted to albums containing only photos.
    • iPhoto for iOS is not supported on devices running iOS 8 or later.

    Camera improvements

    • Time-lapse mode
    • Capture timer
    • Adjust exposure with a simple nudge to lighten or darken a photo prior to capture
    • Burst mode on front facing camera on iPhone 5s
    • Panorama for iPad Air and iPad mini with Retina display

    QuickType keyboard

    • Predictive typing personalized to your writing style, and customized based on the recipient and the app
    • Predictive is available in English (Australia, Canada, UK, US), French (Canada, France, Switzerland), German (Germany, Switzerland), Italian, Portuguese (Brazil), Spanish, Thai
    • Third-party keyboard support

    Health

    • New Health app with easy-to-read dashboard of health and fitness data
    • Ability to share health data with apps to provide a more comprehensive way to manage your health and fitness
    • Add a Medical ID with information about allergies, medical conditions, and more with the option to make accessible from the lock screen
    • Available on iPhone and iPod touch

    Family Sharing

    • Share iTunes, iBooks, and App Store purchases with up to six members of your family.
    • Pay for family purchases with a single credit card and approve purchases by children with Ask to Buy
    • Easily share family photos, a family calendar, locations and more

    iCloud Drive

    • Store all your documents in iCloud and access them from your iPhone, iPad, iPod touch, Mac, or PC
    • Share the same file across multiple compatible apps
    • Edits you make on one device update on all your devices automatically
    • Continuity features so your iPhone, iPad, and Mac work together more seamlessly
    • Handoff to continue what you’re doing as you move from one device to another
    • Make and receive calls and send and receive SMS or MMS messages on your iPad or Mac
    • Instant Hotspot to automatically use your cellular connection to get online with your other devices
    • AirDrop compatibility with OS X Yosemite
    • Available on iPhone 5 or later, iPad (4th generation), iPad Air, iPad mini, and iPod touch (5th generation)

    Spotlight improvements

    • Displays suggestions from Wikipedia entries, places nearby, movies (US only), popular web sites, App Store, iTunes Store and iBooks Store
    • Safari also supports Spotlight suggestions alongside Top Hit and search suggestions
    • Supported for local languages in US, UK, Austria, Australia, Belgium, Canada, France, Germany, Italy, Japan, Netherlands, Spain, Switzerland

    Mail improvements

    • Easily jump between drafts and your inbox with a simple swipe down on the draft
    • Intelligent suggestions for Calendar events and Contacts
    • VIP threads

    Siri improvements

    • Improvements to responsiveness, reliability and accuracy
    • “Hey, Siri” option to initiate Siri using just your voice when your device is plugged in
    • Streaming voice recognition
    • Works with Shazam to answer “What song is playing?”
    • Purchase content from iTunes Store
    • Safari improvements
    • DuckDuckGo search engine support
    • Private browsing per tab
    • Subscribe to RSS feeds in Shared Links
    • Use Camera to scan and enter credit card info

    Maps improvements

    • Flyover city tours
    • Maps place cards in Phone and Contacts
    • Inline map view and travel time notifications for Calendar events

    App Store improvements

    • New Explore tab for easier category browsing
    • Top trending searches displayed in Search tab
    • Scrolling search results
    • App video previews
    • Editors’ Choice badges
    • Quick access to key contacts in multitasking view
    • Interactive Notifications for Messages, Mail, Calendar, Reminders and enabled third-party apps
    • New Tips app to help you do more with your iOS devices
    • iBooks app built into iOS, now with auto night mode and new organization for book series
    • Podcasts app built into iOS
    • Battery usage by app
    • iCloud Keychain can use saved website passwords to easily sign in to associated apps
    • FaceTime Audio call waiting
    • Rich text editing in Notes
    • Peer-to-peer AirPlay discovery and playback

     Enterprise features

    • Expanded data protection to Calendar, Contacts, Messages, Reminders, and Notes in addition to Mail and 3rd-party apps
    • Per message S/MIME email controls
    • Improved UI to make it easier for users to understand the remote management of their device
    • Automatic reply for Exchange
    • Free/busy lookup for Calendar invitations
    • MDM Managed books can be automatically pushed to users

    Accessibility features

    • Redesigned Zoom with one-handed control and multiple zoom modes including picture-in-picture
    • Built-in timer and Touch ID support for Guided Access
    • Speak Screen to read out contents of the screen via gesture or Siri command
    • VoiceOver improvements including Alex voice option and Braille input support
    • Multi-device support for MFi hearing aids to seamlessly switch from one paired iOS device to another

    Features for China

    • Vector-based maps
    • Turn-by-turn navigation
    • Lunar calendar support
    • Improved predictive input
    • Improved weather data

    Expanded language support

    • Dictation support for 22 additional languages: Croatian, Catalan, Czech, Danish, Dutch, Finnish, Greek, Hungarian, Indonesian, Malay, Norwegian, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Slovakian, Swedish, Thai, Turkish, Ukrainian, Vietnamese
    • New keyboards for English (India), Bengali, Filipino, Marathi, Slovenian, and Urdu
    • Hindi localization
    • Definitions of a selected word for additional languages: Russian, Portuguese (Brazil), Thai, Turkish
    • Spanish-English bilingual dictionary
    • Spell check for Turkish
    • Hebrew language support for Text to Speech and VoiceOver

    New developer capabilities including

    • Extensibility, giving apps new sharing options and the ability to create widgets, photo filters and editing tools in Photos, and 3rd-party keyboards
    • Metal, a new graphics technology for game providers to bring console-class 3D games to mobile devices
    • SpriteKit and SceneKit for improved 2D and 3D games
    • HealthKit, so health and fitness apps can share their data with each other
    • HomeKit, a new way for you to control supported devices in your home using Siri
    • Touch ID support so you can sign in to third-party apps with just your fingerprint
    • CloudKit, offering a complete and scaleable back-end solution helping developers eliminate the need for writing server code and maintaining servers

    Bug fixes

    Some features may not be available for all countries or all areas.
    For information on the security content of this update, please visit this website:

    http://support.apple.com/kb/HT1222

    Screen Shot 2014-09-18 at 11.29.20





     
  • Jay Versluis 5:46 pm on September 13, 2014 Permalink | Reply
    Tags: ,   

    How to test which class presented a UIViewController 

    The NSObject class has an interesting method called isKindOfClass. As the name suggests it lets you test what kind of class it belongs to. As everything we use inherits from NSObject, this method is available in our own classes we use in iOS and Mac development.

    This method can come in handy for example when three different classes present the same view controller and you’d like to make decisions based on which controller has presented your content. Consider the following two example.

    If you present a UIViewController via a modal segue you can test which class the presenting view controller belonged to like so:

    // grab a reference to the presenting view controller 
    id thePresenter = self.presentingViewController;
    
    // and test its class
    if ([thePresenter isKindOfClass:[YourViewController class]]) {
        // do this
    } else {
        // do that
    }
    

    If however your view controller was presented via a UINavigationController then the above isn’t going to work. Instead you need to check which view controller was on the navigation stack previously.

    Here’s how to do this:

    // grab a reference to the previous view controller 
    id thePresenter = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count - 2];
    
    // and test its class
    if ([thePresenter isKindOfClass:[YourViewController class]]) {
        // do this
    } else {
        // do that
    }
    




     
  • Jay Versluis 4:48 pm on September 3, 2014 Permalink | Reply
    Tags: UIPasteboard   

    How to access values from the iOS Clipboard (from copy and cut operations) 

    Screen Shot 2014-09-03 at 16.39.32iOS has a class called UIPasteboard which lets you access the last value that a user has copied or cut to the clipboard (or pasteboard).

    The class has a singleton which lets you access a string like so:

    // latest copy/cut string operation
    NSString *latest = [UIPasteboard generalPasteboard].string;
    

    This will work fine when any kind of text is involved. Copy/Cut/Paste is also available for images from the Photos app though, and you can access the latest UIImage like this:

    // latest image
    UIImage *latestImage = [UIPasteboard generalPasteboard].image;
    

    Note that those two values are mutually exclusive: if you’ve copied an image, then the text string will be nil, and when you’ve copied text then the image value will be nil.

    The UIPasteboard class is very versatile and lets you do all kinds of things – check out the Class Reference for more information:





     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel
Password Reset
Please enter your e-mail address. You will receive a new password via e-mail.