Categories
iOS

Announcing iDataGrid ~ a place dedicated to data grid table on iOS

Reading Time: < 1 minute

A little over a year ago, I started working full time as iOS developer for a mining company. One of the first projects is create spreadsheet like application on iPad. At that time there is no UICollectionView, and I found GMGridView to be interesting. I did look at an existing product called iOS Data Grid Table but there are two limitations which prevents me from using it: 1) It displays the values only (read only); 2) Perhaps more important, at that time I don’t recall it includes source code. So I ends up creating my own spreadsheet like tables based on GMGridView. I also read the nice work done by Tom Thompson. Of course that time my knowledge on UITextField (and UITableView for that matter) is not very good, and I did not understand all good work he did. I did used the UIPicker in my project, as it helps the user input data in many cases (simplify/ease input, reduce validation), I believe I borrow some idea from RayWenderlich’s tutorial too (UIPopupController and UIPicker).

A year and half later, when I took another look at this thing, I found at least four new things which are interesting, the shinobi controls (commerical), the MDSpeadView (looks like read only, github, open source), nucliOS (by Infragistics, commercial) and UICollectionView (Apple iOS native, tutorial by RayWenderlich.com)

Categories
Uncategorized

Hello world!

Reading Time: < 1 minute

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Categories
iPhone app

iOS training classes in St. Louis area

Reading Time: < 1 minute

Disclaimer: not including any commercial providers here, as they are usually more expensive. With today’s online learning resources (raywenderlich.com tutorial, stackoverflow to say a few), it’s fairly straightforward for an experienced developer to pick up Objective C and UIKit, etc. I think the value of classes is mostly from interaction with instructors, and do some real life projects.

wustl

slu

umsl

St. Charles Community College

Last but not least, the St. Louis iOS group led by Brian Coyner. The format is different from the training class, but it’s a good place to hang out with fellow iOS developers in the area. For that matter, there is a mobile dev group with an emphasis on Android (led by Heath Borders) as well.

Categories
iPhone app

iOS 7 articles

Reading Time: < 1 minute

http://mattgemmell.com/2013/06/12/ios-7/

http://blog.mengto.com/ios-7-transition-flat/

http://designmodo.com/flat-design-principles/

http://www.marco.org/2013/06/27/ios7-as-defense

http://whoo.ps/2013/05/12/flat-design-is-great-for-mediocre-designers-like-me

Categories
iPhone app

5 ways to do the callbacks in objective C and iOS dev

Reading Time: < 1 minute

1. Selector
http://stackoverflow.com/questions/3482344/what-actually-is-a-selector

An example
http://stackoverflow.com/questions/10758926/add-selector-to-uibutton
[button addTarget:yourObject action:@selector(yourMethod:) forControlEvents:UIControlEventTouchUpInside];

2. NSNotifications
In a way (and in syntax too) it’s similar to Selector, but used in different settings.

example here
http://www.cocoanetics.com/2009/08/love-to-be-notified/

3. Delegate methods
e.g., UIAlert view, UITextField delegate

customized method (example)
http://www.raywenderlich.com/29474/ipad-for-iphone-developers-101-in-ios-6-custom-input-view-tutorial

4. Blocks
https://developer.apple.com/library/mac/#featuredarticles/BuildingWithBlocks/_index.html

example
http://stackoverflow.com/questions/7180552/implementing-a-method-taking-a-block-to-use-as-callback

5. GCD
My favorite example here.
http://www.fieryrobot.com/blog/2010/07/10/a-watchdog-timer-in-gcd/

Combinations of some of the above, e.g, blocks (GCD) with notification

Categories
advice and tips Fun

Travel in Shanghai

Reading Time: 2 minutes

I visited China with my family a few weeks ago. Shanghai is the flight stop where we arrive and depart.

We stayed at the Courtyard Xujiahui, and Four Points by Sheraton at Pudong during our short stay in Shanghai, a few weeks ago. As I have family and esp. little kid nowadays, I prefer western brand hotel (4 stars) so that it has a bit nice and consistent environment. I no longer go to Home Inn or Jinjiang Star. That was when I was single, and just need a clean place to shower and sleep.

Getting around
In general Shanghai taxi is very nice, with a few exceptions. For instance, we waited one hour in Shanghai Hongqiao railway station on rainy Friday evening (it was also the first day of Gao Kao, China’s college entrance exam). It’s probably better idea if one travel light (without big luggages). Another instance was we were at People’s square, about 10 pm, basically no taxi will take us to Xujiahui. There were a few illegal taxies pass by and asked us if we want to take it. Finally we decided to take Metro (subway) to get back.

Tour bus
We took the double deck tour bus at People’s square, my first time taking it, and was surprised to see a lot of changes in Shanghai, for example, I have not seen Lao Xi Meng for many years (probably not seen it since 1995, 18 years). Big big change. I would like to show my brother the picture some time as I thought he probably have not seen it for 18 years either. Tour bus No. 1 is a good idea for short stay visitors because one can use it for 24 hours, and see many interesting places (bus stops at those places) along the way.

Categories
advice and tips Fun

Went to tower grove farmers market yesterday

Reading Time: < 1 minute

It was the first time I brought my wife and my daughter there. The weather was a bit hot, as I went there after 9:30 am. We bought the typical things: ribs and eggs from Bobbi (live spring farm), tomato, beans and cucumber from amish farmer. Serenity enjoyed her bagel and apple at the picnic by the market, it’s just some food we brought in case she wanted to eat.

I’m hoping to bring them more often to the market on Saturday mornings this Summer.

Btw, I was thinking about adding a “news feed” to the ToMarket app I recently created. It’s also funny Serenity singing about “ToMarket” couple times yesterday.

Categories
advice and tips Fun

China trip: some random thoughts

Reading Time: < 1 minute

We took a 2 weeks China trip and came back last Monday evening. A bit exhausted, and at the end of the trip, our daughter got sick, she said she got tummy ache, and needed to go to restroom (lavatory) every 10 min. The fun part of being parents.

Some more serious thoughts

1) My parents are getting older, just as I am getting older. At one morning, my mom asked my dad: did I take the blood pressure medicine. She is not in her 70s yet, but she forgot about it.

2) Money and money: obviously this is a hot topic and it seems my family can not escape it as well. The thing makes me a bit annoyed is when they ask me how much I make in the states, as one of the very first question. It seems money is an important yard stick to measure if a person is successful or not. Btw, it seems everyone back home has more money than me. Interestingly, I read about this article yesterday, it mentioned something similar to that extent.

http://www.prospectmagazine.co.uk/politics/mark-kitto-youll-never-be-chinese-leaving-china/#.Ub54LvmThBH

3) Environment. Not so good. The air quality, and the noise is obvious. One thing a bit interesting is Serenity was curious why the car/bus beep (honk) at each other, or at pedestrian. The air at my hometown is not good due to all the container trucks (18 wheelers), and heavy industry.

4) Hard to get coffee, I mean real coffee, not those faked cappuccino ones made by machines gas station here. It’s more easier to find in Shanghai. I got my black/bare ice coffee (Mei Shi Ka Fei 美式咖啡) at Christen bakery 克里斯丁饼屋.

I will talk more later. Btw, I am seriously thinking about wrote something like my memory.

Categories
Fun

Yoyo’s funny words, Spring Musical

Reading Time: 2 minutes

Yoyo likes to talk a lot, and this morning she said something quite funny: daddy, you should not drink coffee or alcohol anymore, because they won’t help you grow. You should drink some milk. Then she handed her milk bottle to me. Sometimes, she likes to use some big words like “even”, “actually”, we think she learned those from her teachers.

There are also frustrating times, like, she does not like to say “hello” or “good bye” to her teachers, friends and parents. And, sometimes she say words like “go away” to us.

Spring Musical
That’s something we did not expect, and it totally blew up away. I can not upload picture or videos for the obvious reason (it includes other kids). But the teachers did a wonderful job teaching all the kids, and to make it more impressive, the kids bow after they sing the songs.

Overall, we are very impressed with the growth of our daughter. Here is the circle game, the song sing by both the kids and parents at the end.

My thoughts on Power ball
Thought it’s funny. I got a small win on Power Ball last Saturday, I matched the PB only, the prize is $4. Because the cost of ticket is $2, so the return on investment is 100%

I read an Christian Science Monitor article which talked about the government increasing dependence on the lottery revenue, which for the society is not a good thing overall, because there is hidden cost of people got addicted to gambling. The increasing publicity arising from the larger win from Power Ball or Mega Million is one factor to draw more casual players (people who usually don’t play, like me). The CS Monitor article is here.

http://www.csmonitor.com/Commentary/the-monitors-view/2013/0517/A-record-Powerball-jackpot-isn-t-a-record-to-celebrate-video

I read (or heard form NPR) that a blue collar worker bought $80 worth of tickets. I would think one of my extended family member had similar thinking, when operating in the domestic A share stock market. Basically they extrapolate from my example: so if $2 can make $2, $200 can make $200, etc.

This is a very naive and dangerous extrapolation (thinking). I hope fewer people go to that route.

Categories
Fun iPhone app

Objective-C code hall of shame

Reading Time: < 1 minute

Today I found out I made a dumb mistake while deleting an NSMutableArray.

for(int ii=0; ii<[myNSMutableArray count]; ii++) { myNSMutableArray removeObjectAtIndex:ii]; } The reason being it will get confused about the elements (index) during the loop. The correct way is to use removeAllObjects method.