Victor Choi

  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

7/31/2016

Omni Focus and AppleScript to recreate a task on a task

 9:38 PM     AppleScript, Automation, Delegated Task, Omni Focus     No comments   

Here is an AppleScript that you can recreate a task based on an initial task. It is useful when you send someone a mail and need to wait for the mail. So in this case you will have a delegated task in accordance to David Allen’s GTD rule.

So Curt Clifton who is a developer in Omni Group created the AppleScript above to process the case.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

7/20/2016

How to make your statusbar style white in iOS9

 7:47 PM     iOS9, StatusBar, StatusBar Color, StatusBar White, UIBarStyle     No comments   

Sometimes I am a little irrated by making the statusbar white in iOS development. It looks simple. But, the way to do it is a little complicated.

How to make your status bar style white in iOS9

Put the code below into your controller file or AppDelegate file.

self.navigationController?.navigationBar.barStyle = UIBarStyle.Black

When you type it, you might get serveral options for UIBarStyle. But BlackOpaque and BlackTranslucent were deprecated. So don’t be hesitated to choose one of them. If you want to make your statusbar white, choose UIBarStyle.Black. That’s simple.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

7/17/2016

The latest Swift's Regular Expression Tutorial

 2:36 AM     NSReuglarExpression, Regular Expression, Swift     No comments   

Recently I needed to extract a data from Apple’s HealthKit. They provide various queries in HealthKit framework. But it didns’t meet my intention.
So I started to use NSString substring function to extract the data. But, it wasn’t good to match the data that I want.
Finally I got the exact result by using NSRegularExpression and during the process this tutorial was really helpful.

And I think that this is the latest NSRegularExpression tutorial on the web.

So if you want to learn how to use a regular expression in Swift, I recommend the link above.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

7/13/2016

NSBatchUpdateRequest doesn't support updating relationship in Core Data

 6:51 PM     Core Data, NSBatchUpdateRequest, NSBatchUpdateRequest Relationship     No comments   

NSBatchUpdateRequest allows that you can directly store and modify your records rather than with an object graph.

By the way it seems that it doesn’t support updating or modifying a relationship in a core data.

If you want to learn how to use NSBatchUpdateRequest, here is a great and recent tutorial that I found.

So NSBatchUpdateRequest is essential that you handle with lots of data by using Core Data.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

7/10/2016

How to put a padding into a UITextField ?

 2:09 PM     Bottom Margin, Margin, Padding, Top Margin, UIEdgeInsets, UIEdgeInsetsInsetRect, UITextField     No comments   

In iOS development you can put a padding into a UITextField with a code below.

First of all , you can create a customized UITextField class for giving it an inset . And then you can put a code below into the class inherited UITextField class.

let padding = UIEdgeInsets(top: 7, left: 0, bottom: 7, right: 0)

override func textRectForBounds(bounds: CGRect) -> CGRect {
    return UIEdgeInsetsInsetRect(bounds, padding)
}
override func placeholderRectForBounds(bounds: CGRect) -> CGRect {
    return UIEdgeInsetsInsetRect(bounds, padding)
}
override func editingRectForBounds(bounds: CGRect) -> CGRect {
    return UIEdgeInsetsInsetRect(bounds, padding)
}

UIEdgeInsets Type

UIEdgeInsets is defining a inset distnaces for views. You can easily customize your insets for a view with this type. Positive values will shrink the view and negative value will expand the view.

UIEdgeInsetsInsetRect Function

UIEdgeInsetsInsetRect adjusts a rectangle by the given edge insets. In this code you can adjust a rectangle for textfield’s text and etc with UIEdgeInsetsInsetRect. It receives UIEdgeInsets structure type as a parameter.

I hope that Apple provides a function or an interface that we can easily adjut insets through the interface builder.

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Posts Older Posts Home

Search This Blog

Popular Posts

  • How to put a padding into a UITextField ?
  • Keynote Tutorial Text Outline - Make your animation meaningful
  • Keynote Tutorial , Sound is a design,too
  • Keynote Tutorial How to improve your bullets

Blog Archive

  • ►  2020 (2)
    • ►  January (2)
  • ►  2019 (21)
    • ►  December (2)
    • ►  November (6)
    • ►  October (5)
    • ►  September (2)
    • ►  August (3)
    • ►  July (2)
    • ►  June (1)
  • ►  2017 (11)
    • ►  December (2)
    • ►  November (2)
    • ►  July (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (3)
  • ▼  2016 (48)
    • ►  December (3)
    • ►  November (2)
    • ►  September (1)
    • ►  August (10)
    • ▼  July (5)
      • Omni Focus and AppleScript to recreate a task on a...
      • How to make your statusbar style white in iOS9
      • The latest Swift's Regular Expression Tutorial
      • NSBatchUpdateRequest doesn't support updating rela...
      • How to put a padding into a UITextField ?
    • ►  June (7)
    • ►  May (2)
    • ►  April (18)
Powered by Blogger.

Navigation Menu

  • Home
  • About
  • Documentation
  • Contact

Contact Us

Name

Email *

Message *

Copyright © Victor Choi | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates