달력

10

« 2024/10 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

Don’t use UITableViewController. Really.
http://www.skylarcantu.com/blog/2009/09/24/dont-use-uitableviewcontroller-really/

Let’s now cover a few reasons why you won’t want to use a UITableViewController.

  • You can not set the background to a custom image. You can only set the UITableView’s background color property. This stifles the UI possibilities within your application. While using the UIViewController, you get full access to its view property; meaning, you get full access to make the background whatever you want the background to be. If you feel so inclined, go ahead and stick a UIImageView in between your view controller’s view and the UITableView. If you set the UITableView’s background color to clearColor, you’ll see the image shining through!
  • You must have the table sized to be full screen (minus status bar height, navbar height, and tab bar height, if applicable). Why would you want to resize a table? Consider UITableView’s header view. Table headers are nice, really; the problem is that they scroll with your UITableView. Using a UIViewController allows you to use a smaller table and your own non scrolling header above it. It really does make your application look better.
  • Have you ever needed to attach a subview in a UITableViewController? It’s not very pretty. Mostly because a UITableView is a subclass of a UIScrollView. I’m sure you can think of a few reasons not to add subviews to a scrollview. However, adding a subview onto your UIViewController is super easy and recommended. It will not only make the new view a subview of your view controller’s main view, but it ensures that the subview does not scroll along with the table. This is ideal when you want to display a pop up message to your user, briefly display a view over your table that dims the table and makes it inaccessible to touches, or if you simply want to present some options. Take a look at this screenshot from FlowChat, the iPhone irc client by my friends over at brancipater. [/commercial]
:
Posted by netkorea
http://www.cocos2d-iphone.org/forum/topic/7843

I thought I'd go ahead and start a new thread for this...

This is an example project file I put together that handles pinchzoom, scroll, doubletap zoom, etc... feels alot like fieldrunners pinchzoom functionality.

The doubletap-zoom may need some adjustments but overall it works very well. If anyone improves it please share!

http://dl.dropbox.com/u/8990214/pinchzoom.zip

Enjoy

CGSize mapSize;

		self.tileMap = [CCTMXTiledMap tiledMapWithTMXFile:@"TileMap.tmx"];
                self.background = [_tileMap layerNamed:@"Background"];

		self.isTouchEnabled = YES;

                // had to do this because the tilemap is > than the iPhone screen size
		mapSize = _tileMap.contentSize; 

		// create a base layer
		CCColorLayer *base = [CCColorLayer layerWithColor:ccc4(139,139,139,255)];
		base.position = ccp(0,0);
		base.contentSize = mapSize;
		[base addChild:_tileMap];

		[self addChild: base z:0];

		self.anchorPoint = CGPointZero;
		base.anchorPoint = CGPointZero;
		_tileMap.anchorPoint = CGPointZero;

		// attach base layer to PinchZoomLayer
		PinchZoomLayer *pZoom = [PinchZoomLayer initPinchZoom:base];

		// zoom out all the way
		[pZoom scaleToFit];		

		GameSceneHUD *HUD = [GameSceneHUD node];
		HUD.anchorPoint = CGPointZero;
		[self addChild:HUD z:10];

		self.HUD = HUD;



:
Posted by netkorea
http://www.cocos2d-iphone.org/forum/topic/7817

I've been playing around with path finding and tilemaps along with the latest release of cocos2d-iPhone - and I posted a sample app in hopes that it saves someone else some time - or if anyone has comments to optimize/improve this code (I'm sure that won't be difficult as I wasn't shooting for optimization, just trying to learn).

I started with two great tutorials:

Ray Wenderlich's cocos2d-iphone tile map tutorial:
http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d

and BravoBug's A-Star sample program:
http://bravobug.com/news/?p=118

My sample app loads a tile map that contains a start point, an end point, and walls, and detects (and graphically displays) a path between the start and end points. You can select whether or not you want to allow diagonal movements. Anyway, here's the link. I hope someone finds it useful:

http://dl.dropbox.com/u/3729313/PathFinder.zip

Cheers,
Kevin


:
Posted by netkorea
:
Posted by netkorea
http://www.iphonedevsdk.com/forum/iphone-sdk-development/40710-gamekit-api.html

Registered Member
 
Join Date: Feb 2010
Posts: 3
Default

Quote:
Originally Posted by iPhoneSpain View Post
Hi!

This time I´ll try to post my question very clear because I think I messed up last time.

1 - I want to connect several iPhones using Gamekit via Bluetooth.

2 - I don´t want to use GKPeerPickerController (I want to implement a custom picker myself). Thus, I have to use GKSession and GKSessionDelegate.

3 - I´ve tried (with no result) with this methods:

GKSession *currentSession=[[GKSession alloc] initWithSessionID:@"test" displayName:@"XXX" sessionMode:GKSessionModePeer];

[currentSession peersWithConnectionState:GKPeerStateAvailable];

¿Any idea?

I do really need to get this solved.

Thanks in advance
I hope with "several" you mean less than 4. Bluetooth on the iPhone can't handle any more than that (see here.).

Anyways, here's a step by step guide:
1. Init the session, just like you did.
2. Set the delegate and the isAvailable property.
3. Set the data receiver.
Code:
self.curSession = [[GKSession alloc] initWithSessionID:nil displayName:nil sessionMode:GKSessionModePeer];
self.curSession.delegate = self;
self.curSession.available = YES;
self.curSession.disconnectTimeout = 0;
		
// Set data handler.
[self.curSession setDataReceiveHandler:self withContext:nil];
4. Fire up a second device.
5. Wait.
6. The delegates method "didChangeState" should be called. The state should be "GKPeerStateAvailable". Once there, connect to that peer, using the GKSession's "connect" method.

Code:
- (void)session:(GKSession *)session peer:(NSString *)peerID didChangeState:(GKPeerConnectionState)state {
	
	// Retain new session.
	self.curSession = session;
	
	// Do stuff depending on state.
	switch (state) {
		case GKPeerStateAvailable:
			[session connectToPeer:peerID withTimeout:0];
			break;
	}
}
7. Wait (the first connection can take up to 30 seconds, your bluetooth icon should be blinking in the process).
8. The delegates method "didReceiveConnectionRequestFromPeer" should be called. Accept the connection there using the sessions "acceptConnectionFromPeer" method.
Code:
- (void)session:(GKSession*) session didReceiveConnectionRequestFromPeer:(NSString*) peerID {
	
    [session acceptConnectionFromPeer:peerID error:nil];
}
9. Again, "didChangeState" will be called, this time with "GKPeerStateConnected".
10. Boom, you are done.

Don't forget to handle the other delgates methods, e.g. disconnecting the peer in "connectionToPeerFailed". Also, disconnect all peers and release the Bluetooth session before quitting the app.

And, if for the love of god you just can't get it to work, try restarting the device. Sometimes BT just stopped working for me.

Last edited by Regnits; 02-17-2010 at 03:08 AM.

:
Posted by netkorea
아이폰 앱 광고에 대한 좋은 글인 것 같아서 간략히 소개하려 합니다. 원문은 아래 링크를 클릭하셔서 보세요.
Increase iPhone App Downloads by A/B Testing App Names

app store에서는 모든 앱이 icon; app name; price; star rating, company name의 리스트로 보여집니다. 우리가 열심히 만든 앱의 화면을 보여주고 궁극적으로 다운로드하게 하려면 먼저 그 리스트에서 우리 앱을 클릭하지 않으면 소용없죠. 결국 제일 중요한건 최선의 아이콘과 앱 이름을 결정해야한다는거죠. (그러면서 AARRR metrics에 대한 간단한 언급이 나오네요, 흠 뭔가 있어보이는 단어네요... ^^;)

그리고 Click Through Rate(CTR) = clicks / impressions. (Clicks: number of times it was clicked on by people; impressions: number of times the ad was seen by people.) 이라네요. 

어쨌든 구글 같은걸 통해서 대충 광고해서는, 결국 벌어들이는 것보다 광고비로 더 많이 나갈 것이기 때문에, 돈은 안될거라는거죠. 결국 효줄적으로 광고하려면 여러번 광고 전략을 테스트하면서 최선의 방법을 찾아야 한다는건데, 일반적으로 아이폰용 앱 개발자들은 change name or icon, measure, compare, repeat... 뭐 이런 방법을 따른 다네요. 하지만 국내 개발자는 광고비도 아까워서 아무런 행위를 하지 않는 경우가 더 많을 것 같긴하네요. ^^;;;

어쨌든 광고비를 집행할려고 맘 먹어서 위에처럼 CTR을 계산이나 유추해 볼려고 하더라도 우린 방법도 모르죠. 오로지 애플만 몇 번이나 고객에게 리스트로 보여지고, 그 중에서 몇 명이나 탭핑해서 들어왔는지, 알고 있을 거랍니다. 결국 테스트해보려면 앱 스토어가 아닌 다른 곳에서 해볼 수 밖에 없고, 필자는 Admob으로 해봤다네요. 왼쪽이 앱 스토어, 오른쪽이 애드몹에 올렸을 때 랍니다. 어쨌든 애드몹으로 다른 아이콘과 다른 앱 이름으로 노출하고 그 결과들을 테스트했나 봅니다.
apListingAsAd.png

CTR을 1-2%로 생각했을 때, 애드몹 단가가 아래와 같다네요.
50 $ = 1000+ clicks = 50,000+ impressions

어쨌든 약 200$ 정도와 몇시간만 투자하면 어떤게 좀 더 나은 이름과 아이콘인지 테스트해 볼 수 있다는 거고 필자는 테스트해 본 모양입니다. 아래의 결과부터 보죠.
downloads.png

필자의 무료 앱에 대한 테스트 결과이고, 굳이 무슨 이름인지와 어떤 아이콘인지는 설명하지 않을 거랍니다. 그렇죠. 실제 이름과 아이콘이 중요한게 아니라 이름과 아이콘을 변경했을 때 실제 다른 결과가 나온다는걸 증명했다는게 중요한 것이겠죠. 실제 광고비를 집행하려면 광고비 대비 구매한 사용자의 수가 중요할텐데, 이 글의 목적은 최선의 앱 이름과 아이콘은 중요하다는 것이고, 그걸 알아내는 비용이 200$ 정도면 훌륭하지 않냐는 거네요. ^^;

왜 이런 방법이 우리가 할 수 있는 최선이라고 생각하냐에 대한 설명으로 아래 그림을 보여줍니다.
salesFunnel.png

이것은 PR이나 블로그 소개같은것이 없는 무료 앱의 Sales Pannel입니다. 보는 방법은 App Store List에 나타나는 횟수가 5만번이라고 했을 때, 다음 단계인 탭핑해서 앱 스토어 페이지로 들어갈 비율인 2%를 곱하면, 실제 천 명 정도가 된다는 거죠. 그 후 실제 다운로드 비율은 20%가 되어서 200번 정도라고 할 수 있고, 이런 식으로 나가는 겁니다. 그래서 실제 무료 앱을 다운 받아서 사용해보고 실 구매까지 이어질 비율은 5만분의 1이라는 거죠. 여기서 어느 단계이든지 비율을 올리면 전체 비율도 올라가겠죠. 소유하고 사용하거나 구매까지 이어질 비율을 올리는 것은 비용도 많이 들고 어려운 일이지만, 노출 빈도를 올리는건 상대적으로 저렴하면서 쉽다는거죠. 필자의 주장으론 겨우(!????! ㅠㅠ) 200$로....ㅎ

이런 이름과 아이콘을 결정하는건 앱을 출시 전에 보통 하겠지만, 출시 이후에도 할 수 있답니다. 필자 경험으론 보통 기존 사용자들은 앱 이름이나 아이콘 바꾸는건 신경도 안쓴다는군요. 하긴 저도 일반 사용자 관점으론 제가 사용하는 앱 이름이나 아이콘에 그렇게 신경써 본 적이 없는 것 같네요. 필자의 주장처럼 올렸는데 마치 캔디폰처럼 쓸쓸하다면 이름이나 아이콘 바꾸는 것도 고려해 봄직하네요.

-------------

어쨌든 숫자가 나오는 글은 그 근거를 우리가 믿든 안믿든 왠지 모를 신뢰감을 주죠. ^^; 뭐 글 내용으로 봐선 아주 터무니없는 내용은 아닌것 같고, 광고단가나 여러 비율들이 막연한 것들에 대한 어떤 감을 주는 것 같아서 소개해 봤습니다.
:
Posted by netkorea