Skip to content

Instantly share code, notes, and snippets.

View wonkwh's full-sized avatar
💭
I may be slow to respond.

wonkwh wonkwh

💭
I may be slow to respond.
View GitHub Profile
@wonkwh
wonkwh / gist:1171617
Created August 25, 2011 19:36
Create Tabbar without XIB(1)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions
{
UITabBarController *tabBarController = [[UITabBarController alloc] init];
[self.window setRootViewController:tabBarController];
// iOS 4.0 이전
//[window addSubView:[tabBarController view]];
[tabBarController release];
[self.window makeKeyAndVisible];
@wonkwh
wonkwh / gist:1171625
Created August 25, 2011 19:39
Create Tabbar without XIB(2)
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self)
{
// get the tabbar item
UITabBarItem *tbi = [self tabBarItem];
[tbi setTitle:@"Favorite"];
// tabbar의 아이콘 이미지를 추가하려면 아래추가
//[tbi setImage:[UIImage imageNamed:@""];
@wonkwh
wonkwh / gist:1504675
Created December 21, 2011 05:09
UINavigationBar의 배경이미지가 적용됨
UILabel *titleLabel = [[UILabel alloc] initWithFrame:
CGRectMake(0.0f, 0.0f, 200.0f, 25.0f)];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = [UIFont systemFontOfSize:20.0f];
titleLabel.textAlignment = UITextAlignmentCenter;
titleLabel.textColor = [UIColor blackColor];
titleLabel.text = @"잘되는구먼!";
self.navigationItem.titleView = titleLabel;
[titleLabel release];
self.navigationController.navigationBar.layer.contents =
@wonkwh
wonkwh / .gitignore
Created September 11, 2012 07:27 — forked from keyboardsurfer/.gitignore
Android gitignore
# built application files
*.apk
*.ap_
*.jar
# keystore
*.keystore
# files for the dex VM
*.dex
@wonkwh
wonkwh / coloredlogcat.py
Created September 11, 2012 08:11 — forked from kevinmcmahon/coloredlogcat.py
Colored Logcat
#!/usr/bin/python
'''
Copyright 2009, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@wonkwh
wonkwh / MyLogger.java
Created November 15, 2012 10:53
android logger class
import android.util.Log;
public class MyLogger {
public static final boolean LOGD = true;
public static final boolean LOGE = true;
public static void d(String tag, String msg) {
if (LOGD) {
@wonkwh
wonkwh / FontUtils.java
Created November 15, 2012 10:59
roboto font 를 사용하게 하는 FontUtil class
import android.content.Context;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.HashMap;
import java.util.Map;
@wonkwh
wonkwh / FontUtils.java
Created November 15, 2012 11:01
Roboto font in my android app
Typeface tf = Typeface.createFromAsset(getAssets(),"fonts/Roboto-Black.ttf");
TextView tv = (TextView) findViewById(R.id.FontTextView);
tv.setTypeface(tf);
@wonkwh
wonkwh / github.css
Created November 24, 2012 03:32 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@wonkwh
wonkwh / ProgressSprite.java
Created November 29, 2012 13:28
cocos2d-android:using CCProgressTimer
/**
* User: kwanghyun
* Date: 12. 11. 28
* Time: 오후 6:10
*/
public class ProgressSprite extends CCProgressTimer
{
private static final String TAG = "ProgressSprite";
private GameLayer game_layer_ = null;
private float progress_rate_;