Split an implementation file into multiple files in iOS

120 total views, 4 views today

Posted in iOS Tagged with: , , , , ,

Pet Arena

Our first game

Pet Arena is going to be the most exciting game ever.
In the role of a pet master, you have to take care of your pet, train it and have it compete with your friends’ pets via Bluetooth or Wifi. Pet Arena will be a social and fun game.

Read more ›

236 total views, 4 views today

Posted in Mobile Labs Tagged with: , , ,

AVFoundation vs MediaPlayer

Reference

1. AV Foundation Programming Guide
2. WWDC 2011 Session 405 Exploring AV Foundation
3. WWDC 2011 Session 415 Working With Media In AV Foundation
4. WWDC 2014 Session 503 Mastering Modern Media Playback
5. WWDC 2011 Session 406 AirPlay and External Displays in iOS apps
6. AVPlayerDemo
7. VKVideoPlayer
8. ALMoviePlayerController
9. AV Foundation Playing Videos
10. AVPlayer and MPMoviePlayerController differences
11. MPMoviePlayer Tips

144 total views, 4 views today

Posted in iOS Tagged with: , , , ,

DSL in Objective C

Reference

1. Domain Specific Languages by Martin Fowler
2. Writing Less Code
3. Domain Specific Languages: Objective-C, Ruby and Java (and Groovy)
4. UITableViewDSL
5. expecta
6. Masonry
7. Fluent Interface
8. Fluent interface pattern in Objective-C
9. THE BUILDER PATTERN IN OBJECTIVE-C
10. ObjectiveCVerbalExpressions

392 total views, 8 views today

Posted in iOS Tagged with: , , , , , , ,

UIWindow in iOS

In this article, I ‘ll share what I know about UIWindow

keyWindow

An app can have many UIWindow. The key window is the one that is designated to receive keyboard and other non-touch related events. Only one window at a time may be the key window.

You call makeKeyAndVisible or makeKeyWindow to make a UIWindow become the keyWindow. Note that UIWindow is hidden by default, so makeKeyAndVisible both makes a UIWindow become keyWindow and set its hidden property to NO

Read more ›

792 total views, 4 views today

Posted in iOS Tagged with: , , ,

AFNetworking gotcha

Hi, in this AFNetworking gotcha series, I’ll share something I learn about AFNetworking and remind you of some properties you may overlook

AFHTTPRequestOperation is an NSOperation

Take a look at AFURLConnectionOperation.m and its overridden “start” method, you ‘ll learn how AFNetworking starts an NSURLConnection. The same holds true for NSURLSession

Read more ›

396 total views, 4 views today

Posted in iOS Tagged with: , ,

Some good iOS questions

Here is the list of some good iOS questions on Stackoverflow. Most of the questions I list here are about the language Objective C. All in my opinion :) . Actually, I prefer the “Why” questions

Questions

1. What’s the meaning of Base SDK, iOS deployment target, Target, and Project in xcode
2. const char* and char const* – are they the same?
3. Objective-C static, extern, public variables
4. UIView frame, bounds and center
5. What’s the difference between a string constant and a string literal?] Read more ›

424 total views, no views today

Posted in iOS Tagged with: , , , , ,

How to create Xcode plugin

I list here some good references that teach how to build your own Xcode plugin. The best way to build an Xcode plugin is to learn from some with the same functionalities

Read more ›

464 total views, no views today

Posted in iOS Tagged with: , , ,

Android XML drawables Tips – Part 4: LayerDrawable

In this post series, I will share some cases I used Android drawable in more efficient ways. They can help your code looks cleaner, separating Java vs. XML, or can even reduce the complexity of your View hierachy.

Types of Drawable I will be writing about in this series are: LevelList / Bitmap / StateList / Layer / Clip Drawable

Read more ›

752 total views, 4 views today

Posted in Android

Handle reachability in iOS

Here are what I learn about reachability handling in iOS, aka checking for internet connection. Hope you will find it useful, too

The naive way

Some API you already know in UIKit can be used for checking internet connection. Most of them a synchronous code, so you ‘d better call them in a background thread

Read more ›

764 total views, 4 views today

Posted in iOS Tagged with: ,