某储备粮的“学习笔记” - Github http://blog.gregwym.info/tag/Github/ zh-CN Sat, 22 Dec 2012 14:26:35 +0800 Sat, 22 Dec 2012 14:26:35 +0800 Github, you should have told me earlier... http://blog.gregwym.info/github-you-should-have-told-me-earlier.html http://blog.gregwym.info/github-you-should-have-told-me-earlier.html Sat, 22 Dec 2012 14:26:35 +0800 咳嗽di小鱼 Back to the time it works

In my last release of doGRT, I was proudly announcing the AUTO UPDATE feature. The feature which would let my user updates the schedule data without update the entire app from the App Store. I spent quite a bit of time to implement this feature, and put the schedule data on a place that I thought will never let me down - Github.

Seriously, it was working like a charm. At least during the time I was testing it. Unfortunately, the feature died before anyone can actually try it out.

What happened?

Right before the schedule season change, Github put out a blog post saying "Goodbye, Uploads". At the main while, they replaced the Downloads Section with Tags and completely disabled the upload.

So what does that mean?

Even tho Github will keep the downloads page for 90 days, I cannot upload any new file to it. Cannot upload means I cannot tell my app "A newer version of schedule is available, go download it!!!!"

How sad is that`T_T

Github, can't you tell me this a bit earlier? or allow upload for extra 90 days? sigh

What I'm going to do?

First, I wanna say sorry to doGRT users. If it is not the case, you guys would have the hot and fresh holiday schedule in your hand now. This situation should have been avoided if I have left enough flexibility in my implementation.

Of course, I'm going to fix it! Going to release a quick fix version with Winter schedule first.

The more feature I'm working on:

  • Day picker: Look up schedules for a specific day, so you can plan ahead.
  • Bus reminder: Remind you to catch/get off at a curtain bus stop
  • GRT Twitter message intergration

Feel free to @gregwym on twitter about your suggestions. Or you can email me through the feedback button in the app.

Merry Christmas,
Greg

]]>
5 http://blog.gregwym.info/github-you-should-have-told-me-earlier.html#comments http://blog.gregwym.info/feed/github-you-should-have-told-me-earlier.html
InformaticToolbar: iOS Toolbar Enhancement Library http://blog.gregwym.info/informatic-toolbar.html http://blog.gregwym.info/informatic-toolbar.html Mon, 05 Nov 2012 09:08:18 +0800 咳嗽di小鱼 First of all, the repo: https://github.com/gregwym/InformaticToolbar

Intro

Remember in the Mail App, it shows update status and sending mail progress in the bottom toolbar. I think it is a really neat way to show information, especially for those apps who use native iOS UI elements.

However, I couldn't find any lib out there for this task. So I decide to invent the wheel myself.

Feel free to post any issues or patch. It's my pleasure for any who like my work.

What it does

InformaticToolbar is mainly an UIViewController Category which allows you to add several UIBarButtonItems set to your toolbar.

The sets are defined as subclasses of ITBarItemSet. All ITBarItemSet can have a dismiss button if the target and action has been defined. If more than one set has been added, a switch button (an arrow) will be displayed on the left for user to switch between sets.

For now, there are three pre-defined set:

  • ITLabelBarItemSet: a textLabel and a detailTextLabel
  • ITProgressBarItemSet: a textLabel and a progressBar
  • ITConfirmationBarItemSet: two label and a check-mark button

You can easily create new sets by extending ITBarItemSet yourself.

Screenshot:

Screenshot

How to use

First: clone it to your project directory

cd *your-project-location*
git submodule add git://github.com/gregwym/InformaticToolbar.git

Second: add to your project

You can either add the source codes directly or

  • drag and drop InformaticToolbar.xcodeproj to your project.
  • In your project setting

    • In Build Phases->Target Dependencies, add InformaticToolbar (the library)
    • In Build Phases->Link Binary With Libraries, add libInformaticToolbar.a
    • In Build Settings, add "${PROJECT_DIR}/InformaticToolbar/" to User Header Search Paths, include the quotation marks.
    • In Build Settings, set Always Search User Path to YES
    • In Build Settings, set Other Linker Flags to -ObjC

Third: add the header

In any UIViewController that you want to use this lib, add #import "InformaticToolbar.h" at the front.

Or easier, you can add the import to YOUR Prefix.pch file.

Forth: add an item set to toolbar

Let's say I want to add a Label to my toolbar, I can call the following method in an UIViewController:

- (IBAction)addLabelBarItemSet:(id)sender
{
    ITLabelBarItemSet *labelBarItemSet = [ITLabelBarItemSet labelBarItemSetWithDismissTarget:self andAction:@selector(dismissBarItemSet:)];
    labelBarItemSet.textLabel.text = @"This is text label. ";
    labelBarItemSet.detailTextLabel.text = @"This is detail text label. ";
    [self pushBarItemSet:labelBarItemSet animated:YES];
}

- (void)dismissBarItemSet:(ITBarItemSet *)sender
{
    [self removeBarItemSet:sender animated:YES];
}

Demo Project

In the project, there is a demo app you can tryout. ITViewController.m includes the sample usage of all three pre-defined item sets.

License

Creative Commons License

InformaticToolbar by Greg Wang is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

]]>
0 http://blog.gregwym.info/informatic-toolbar.html#comments http://blog.gregwym.info/feed/informatic-toolbar.html