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

8/30/2016

Simple Migration Options for CoreData PersistentStoreCoordinator

 1:46 PM     CoreData, Migration, PersistentStoreCoordinator     No comments   

If you change a scheme of your CoreData such as adding a new attribute, you can easily migrate it with options below.

do {
            try persistentStoreCoordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: storeURL, options: [NSMigratePersistentStoresAutomaticallyOption: true , NSInferMappingModelAutomaticallyOption: true])
        } catch {
            fatalError("Error migrating store: \(error)")
        }
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

8/29/2016

New Fitbit Flex 2 , Fitbit Charge 2 and Apple Watch 2

 4:58 PM     Apple Watch 2, AppleWatch, Fitbit charge 2, New Fitbit Flex 2     No comments   

Fitbit Flex 2

Fitbit launched Fitbit Flex 2 which put a new function to track a swimming activity. It is similar to Misfit Shine.

Tracking a swimming activity

It tracks…

  • Laps
  • Duration
  • Calories
  • Distance

If it is compared to Misfit Shine’s Swimmer’s edition, Misfit Shine tracks everything which Fitbit Flex2 supports.

I think that Misfit Shine is more customized to track a swimming activity. Misfit Shine supports a unique feature calling ‘Swim Time Countdown’.

Water Resistance

Both of them support 50 meters water resistance.

Fitbit Charge 2

Several features which you should notice.

  • Improved its heart rate sensor.
  • Multi-Sports mode: tracks specific exercises like running , weights or yoga.
  • SmartTrack: Automatically records select exercises like hiking , biking , sports and more. Interested in experiecing how it works.

Fitbit VS Apple Watch 2

Now I wonder that the upcoming Apple Watch 2 supports more tracking features which Fitbit leads with their new products.

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

8/21/2016

How can I use San Francisco mono font in Xcode7 ?

 2:20 AM     San Francisco mono, Xcode7     No comments   

Apple released a new coding font which calls San Francisco mono. I have used Source Code Pro which Adobe created. But I would like to test and use Apple’s one in Xcode7.

Basically San Francisco mono font is pre-installed in Xcode8 beta. So here is the way to use it in Xcode7.

  1. Install Xcode8 and find the location of the font.

  2. Copy them into your font directory in macOS. I used ~/Library/Fonts

  3. Launch Xcode7 and configure it as a coding font. (Xcode7 has a bug that you can’t select font collections in your macOS system. If you meet the problem, run the command below in Terminal and try it again.)

    defaults write -app Xcode NSFontPanelAttributes -string "1, 0"
    
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

8/15/2016

Why did I get the result nil through dataTaskWithURL ?

 3:54 PM     dataTaskWithURL, iOS Networking, NSURLSession     No comments   

If you use dataTaskWithURL , your intention might be getting a data from server and display the data to your UI. But, sometimes it makes a problem that the resulted data is nil.

To solve this issue, first of all you must recognize that dataTaskWithURL runs asynchronously. Conversely UI stuffs runs on the main thread on iOS. So the time that you get a data from the server might not be synced with the time you display the data to your UI. So in this case you might see a strange nil value on it.

You can simply think that I can run it sychronously. But, it would cause a bad user experience. So here is a solution which is creating another completionHandler to run it asynchronously. And then if you want to update your UI , remember that the task should be taken on main queue.

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

8/14/2016

How can I change the modal transition of a presented view controller?

 5:47 AM     modal transition, modalTransitionStyle, presented view controller, presenting view controller     No comments   

In iOS the default transition between presenting view controller and presented view controller is .CoverVertical. But sometimes you might want to change it to a different animation style.

If you setup a presented view controller , it has a property which calls modalTransitionStyle and you can choose one of styles below,

  • CoverVerticial (Default)
  • FlipHorizontal
  • CrossDissolve
  • PartialCurl
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

8/13/2016

How to point your Godaddy domain to a2Hosting

 1:09 PM     a2hosting, domain, godaddy     2 comments   

I recently created an account in a2hosting to host a wordpress website. And then I need to point a domain in Godaddy to a2hosting account.

This video helped me to get it done.

By the way a2hosting’s default option doesn’t provide a public IP address for the account. I use a2hosting’s Shared Hosting Swift product. They charge the additional fee $4 for it.

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

8/12/2016

The relationship between AnchorPoint and Position in Layer

 3:21 PM     AnchorPoint, CALayer, iOS, Layer, Position, View     No comments   

I felt difficult to understand the relationship between AnchorPoint and Position in Layer. So I found this in stackoverflow. And it helped me a lot to understand it.

Through my testing I got some principle.

  • If a layer’s frame is already defined , the anchorpoint doesn’t affect the position of the layer.

  • If you change an anchorPoint of a layer which already has a frame and a position , the origin of the layer’s frame will be changed by the setting of anchorPoint.

    let view = UIView(frame: CGRectMake(0,0,400,400))
    view.backgroundColor = UIColor.grayColor()
    let label1 = UILabel(frame: CGRectMake(100,100,100,20))
    label1.text = "Label1"
    print("AnchorPoint: \(label1.layer.anchorPoint) , Frame: \(label1.layer.frame)")
    print("Position: \(label1.layer.position)")
    label1.backgroundColor = UIColor.whiteColor()
    view.addSubview(label1)
    view
    
    // AnchorPoint to (1,1) 
    
    label1.layer.anchorPoint = CGPoint(x: 1.0, y: 1.0)
    label1.text = "Label1"
    print("AnchorPoint: \(label1.layer.anchorPoint) , Frame: \(label1.layer.frame)")
    view.addSubview(label1)
    view
    
  • If you set up a layer’s anchorPoint before you set up the frame of the layer, the position of the layer will be affected by setting of the anchorPoint.

    let label2 = UILabel()
    label2.layer.anchorPoint = CGPoint(x: 1.0, y: 1.0)
    label2.frame = CGRect(origin: CGPoint(x: 100,y: 100), size: CGSize(width: 100.0, height: 20.0))
    print("AnchorPoint: \(label2.layer.anchorPoint) , Frame: \(label2.layer.frame)")
    print("Position: \(label2.layer.position)")
    
    let label3 = UILabel()
    label3.layer.anchorPoint = CGPoint(x: 0.0, y: 0.0)
    label3.frame = CGRect(origin: CGPoint(x: 100, y: 100), size: CGSize(width: 100.0, height: 20.0))
    print("AnchorPoint: \(label3.layer.anchorPoint) , Frame: \(label3.layer.frame)")
    print("Position: \(label3.layer.position)")
    
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

8/11/2016

How can I start UIBezierPath animation from the top of a circle?

 4:05 PM     Circle Animation, iOS Circle Drawing Animation, UIBezierPath     No comments   

When you draw a circle by using core animation , you might use CAShapeLayer and UIBezierPath to draw it.

UIBezierPath(arcCenter: view.center, radius: view.bounds.width / 2, startAngle: startAngle, endAngle: endAngle, clockwise: true).CGPath

The code above there are startAngle and endAngle parameters which affect where your animation start and end. So if you want to draw the circle from a specific position to another position, I recommend this link.

If you want to start from the top of the circle , your startAngle should be M_PI + M_PI_2.

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

8/05/2016

How to securely use xmlrpc

 1:48 PM     htaccess, Wordpress, xmlrpc attack, xmlrpc.php     No comments   

I like to post an article to wordpress through Byword or Ulysses. And those tools use wordpress’s xmlrpc.php.

By the way if you use xmlrpc.php with your own server , you might face up to infinite attacks which target xmlrpc.php. And I horribly experience it.

If you want to independently operate your wordpress blog on your own server , I recommend to block xmlrpc.php access from anonymous users with the code below.

<FilesMatch "xmlrpc\.php$">
    order deny,allow
    deny from all
    allow from [Your IP address]  // Allow the only your ip address
</FilesMatch>

Put the code above into your .htaccess file in the root folder of wordpress.

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

8/04/2016

My experience on Upthere

 5:22 PM     No comments   

Upthere is a kind of new concept of cloud service such as iCloud, Dropbox, Google Drive. Mostly cloud services save your data in both local and cloud. It could be beneficial for someone who wants to back up their data.



The problem is taking too much storage in your local storage



iPhone 16GB model has been criticized by users because it isn’t enough to fully use. The storage is too small to install bunch of applications from Appstore. Also the size of photos and videos taken by users is getting bigger and bigger.



Upthere provides a solution for it. It doesn’t take much space in your phone or notebook. It just saves thumbnails of photos or videos which are much smaller than fully saving them. So you can save your space with it.



Not enough to replace conventional cloud services



The problem that I faced with Upthere is organizing my documents in it. It suggests Loop as a tool for organizing. But, it isn’t enough to replace the conventional folders. Even they don’t provide tags to organize my files. So I hope that they provide a way for making it better.






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)
      • Simple Migration Options for CoreData PersistentSt...
      • New Fitbit Flex 2 , Fitbit Charge 2 and Apple Wat...
      • How can I use San Francisco mono font in Xcode7 ?
      • Why did I get the result nil through dataTaskWithU...
      • How can I change the modal transition of a present...
      • How to point your Godaddy domain to a2Hosting
      • The relationship between AnchorPoint and Position ...
      • How can I start UIBezierPath animation from the to...
      • How to securely use xmlrpc
      • My experience on Upthere
    • ►  July (5)
    • ►  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