Posts

Clean code architecture

Image
There are several architecture we use based on the application requirement. I have used Ribblet and Viper design patter most of the time. Viper Pattern  : [ GitHub ] The word VIPER is a backronym for View, Interactor, Presenter, Entity, and Routing. Read more about Viper . Viper architecture: Download the Viper sample : GitHub Sample also has integration of Google SDK and using Google Places API usage. Riblets : [ GitHub ] Riblets are Uber way of clean code architecture. Uber app currently using Riblets architecture. More info on Riblets - Ref Riblet architecture: Communication between the Riblets: GitHub :        Viper Sample (Swift)           Uber Riblet Sample (Swift)

SSAutoMailScript - To scan email address and initiate new mail.

Want to automate the process of sending mails to bulk of emails from mail content? -  SSAutoMailScript Download the   SSAutoMailScript  to help you out. Usage: Open the script editor and change the  set your mail account . [Check mail preference - Account for account name] tell application "Mail" activate open (1st message of mailbox "Drafts" of account " <Your Account Name> ") end tell Save the template email in  Drafts  folder in your Mail. Using Outlook  then change the delimiter to " ; " whereas the Apple Mail uses " , " . To change it, modify the below line accordingly. set theAddresses to theAddresses & (thisItem as rich text) & "," & return  4.   Thats it! now select the mail which has the email contents and run the script . Result:  Script will scan the email address in selected mail, a new compose window will open with all scanned email         address with the template cho

SSButtonUnderline

Image
SSButtonUnderline  is code snippet, where you can quickly use it to underline the UIButton title. Basically its a subclass of UIButton where you can use it in Storyboard/Nib to create a underline for the UIButton title. Programmatically ? SSButtonUnderline *button = [[SSButtonUnderline underlinedButton]  setTitle:@"Button" forState:UIControlStateNormal]; Or  use SSButtonUnderline class as custom class in storyboard/nib inspector by selecting a UIButton. Download Source 

SSToken

Image
SSToken is a replacement for NSTokenField. SSToken  is open and customisable to your needs. Where as the native NSTokenField is very hard for customisation. Whats great? SSToken will increase the content view height when new token is added like in a Apple Mail - Compose Mail. Usage: Instantiate SSToken just like the rest of NSView designated initializer  initWithFrame: method. Use setTokens: method to set the array of tokens. Implement delegate methods if in case its needed. Features: Customisable tokens. Replace the token images to match your needs. SSToken will grow like in Apple Mail - Compose Mail. Able to remove the token by tapping on close button on SSToken. Able to change the text color of the SSToken. Highlighting the token with different color on mouse hover. Future Implementation: Able to edit the text just like NSTokenField. Suggestion as we type in SSToken. Selection of SSToken for custom actions like delete. Download Source 

SSShare

Image
SSShare  is a collection of commonly used social network to share the stuffs within an application. SS Share  is simple to integrate with any application for iPhone/iPad. Whats great? SSShare is a universal sample made for both iPhone and iPad. No need to integrate each individual framework for sharing. Dropbox support for sharing the contents. All you to need is set the delegate of SSShareController shared instance  as your controller class and   implement protocol  SSShareControllerDelegate method ,  -(SSShare *)shareDataForShareType:(ESSShareType)type Features: User can share the stuff to Facebook , Twitter , Dropbox and mail . Great UI for sharing from any controller view. (Modified KLExpandingSelect - Dropbox support) Replace the images and respective constants for the application needs. Universal app support. Used ARC for object life cycle. Future - tumblr, stumbleupon and Instapaper support. Usage: Copy the framework DropboxSDK.framework

SSPhotoPicker

Want to quickly integrate a feature to choose photos from iPad/iPhone camera/photo album? - SSPhotoPicker. SSP hotoPicker is code snippet, where you can quickly integrate with your application. [gallery link="file" columns="2"] Whats great? SSPhotoPicker is a universal sample made for both iPhone and iPad. Saves time to write couple of code, replace images whichever suits best for the application. All you to need is to instantiate  SSPhotoPickerViewController and   implement protocol  SSPhotoPickerViewControllerDelegate Features: Customisable size of the picker. User can choose from Camera and Photo Album. Custom images. Universal app support. Integration of popover to iPhone by code optimisation for WEPopoverController (Werner Altewischer) Download Source  Universal iPad Only Version

SSRadioButton

Image
I have written a code snippet for the radio buttons behavior. If you are looking for a quick integration of vertical aligned radio button view download and integrate it to your project. SSRadioButton is customized UITableViewCells to look like a radio button and the behavior of radio button is implemented in the managing classes. Whats great? No need to take care of the custom cells, go forward and implement SSRadioButtonCellDatasource protocol in the modal objects and thats it!! Features: Radio button behavior implementation. Custom background image. Custom radio button height. Universal Support. Download Source