반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형
Posted on . Written by



This could be the year for RIM’s rebirth. The previously struggling company made a splash with Tuesday’s announcements: they’re rebranding the company name to “BlackBerry,” hiring Alicia Keys as the new Global Creative Director, unveiling the BlackBerry 10 operating system, and announcing two new phones: the BlackBerry Z10, a touchscreen smartphone, and the Q10, a smartphone with a physical keyboard.

올해는 RIM 이 다시 태어나는 해가 될 겁니다. 지난 화요일 발표로 여러 얘기가 설왕설래 했었죠. RIM 이 회사 이름을 "BlackBerry" 로 아예 바꿔버린다고 발표를 했었습니다. 그리고 Global Creative Director 로 Alicia Keys 를 영입했고 BlackBerry 10 운영체제를 발표했습니다. 그리고 두개의 새로운 전화기도 발표했구요. BlackBerry Z10으로 터치 스크린 방식의 스마트폰이고 Q10 이라는 physical keyboard 형식의 스마트폰 두 기종을 발표했습니다.




BlackBerry’s bold attempt to compete in the smartphone market could make consumers and competitors take a second look. The BlackBerry Z10 features a 4.2 inch screen, unique predictive text capabilities that adapt to writing patterns, app essentials (including video, messaging, Facebook, Twitter and more), innovative software design, and a time shift camera that allows users to capture their “best” face. On the performance front, the dual-core processor with 2GB memory makes this the fastest BlackBerry to date.

Considering BlackBerry’s reinvention, how do you think the company will fare against the competition in 2013?


스마트폰 시장에서 소비자들과 경쟁자들에게 다시 어필하기 위한 블랙베리의 시도인데요. BlackBerry Z10 은 4.2인치 스크린에 writing pattern들을 장착한 unique 한 예상문자 작성 기능이 있고 주요 앱들이 제공되고 있습니다. (비디오, 메세징, 페이스북, 트위터 같은 앱들이요.) 소프트웨어 디자인의 혁신이 있고 사용자가 "best" face 를 찍을 수 있도록 해 주는 time shift camera 가 장착돼 있습니다. 퍼포먼스쪽으로 보면 듀털코어 프로세서가 장착돼 있고 2GB 의 메모리가 있어 아주 빠른 속도를 보여주고 있습니다. 이런 블랙베리의 재혁신을 보시면서 어떤 생각이 드시나요? 블랙베리가 2013년에는 경쟁사들과의 경쟁에서 좋은 결과를 볼 것 같나요?



오늘은 처음으로 Coronasdk  홈페이지의 blog 에 올라오는 글 중 Friday Night Forum 글을 읽고 블로그에 옮겨 봤습니다.

블랙베리와 관련해서 올라왔는데요.


회사에서 직원들에게 회사 폰으로 블랙베리를 제공하고 있어서 제가 개발하는 모바일 웹들은 모두 블랙베리를 주 타겟으로 하고 있습니다.

회사 폰이 블랙베리가 아닌 다른 기종으로 쉽게 바뀔것 같지도 않구요.


그래서 블랙베리에 대해 관심이 있는데요.


이번에 새로운 운영체제가 발표 됐네요.


회사에서 회사 폰을 교체할 때 이 새 운영체제의 블랙베리를 선택할지 아니면 아이폰이나 안드로이드를 선택할지는 모르겠습니다.


블랙베리가 일반 소비자 시장에서는 인기가 전혀 없지만 아직 Enterprise 시장에서는 다른 폰 보다 우월한 면이 있기는 한 것 같습니다.


Corona SDK 에서는 블랙베리를 지원하지 않는 것으로 알고 있는데 Corona SDK 블로그에 관련 글이 올라와서 읽어 봤습니다.


코로나에서 블랙베리도 지원하려고 하는 걸까요?

아니면 블랙베리에서 안드로이드 앱을 사용할 수 있도록 지원할 수도 있겠네요.


원래 블랙베리 10에서 안드로이드 앱을 지원할 거라는 뉴스가 있기는 했는데 이번 발표내용을 보도한 기사에서는 그런 얘기를 볼 수가 없네요.




반응형


반응형
by Corona Labs on Wednesday, January 30, 2013 at 7:32pm ·



When leaving a storyboard scene, you are required to clean up:

 

Runtime listeners    

Timers    

Transition's that have an onComplete    

Audio that has an onComplete    

Network requests that have not completed yet and will call back to a listener.

 

Also, if you load sounds in your storyboard scene in either createScene, willEnterScene or enterScene, it's your responsibility to dispose of them in exitScene() or destroyScene().



스토리보드 장면을 떠날때는 깨끗하게 정리하고 가셔야 합니다.


런타임 리스너

타이머

onComplete 된 Transition

onComplete 된 오디오

아직 complete 되지 않았고 리스너로 call back 될 네트워크 요청


그리고 createScene, willEnterScene or enterScene 안에서 스토리보드에 사운드를 로드했다면 exitScene() or destroyScene() 에서 그것들을 dispose 시켜주셔야 합니다.



댓글에는 이미지나 위젯들도 clean up 해 줘야 된다고 써있네요.

그리고 transition이나 network request 는 어떻게 cancel 해야 하냐는 질문도 있구요.

아직 답글은 안 달렸고.....

그거 보니까 작년 12월에 보낸 제 질문 메일이 생각납니다.

이 블로그에 올라온 질문들 정리해서 메일로 보냈었는데... 한달째 감감무소식....

이젠 메일로 보내지 말고 포럼에 올려봐야겠어요.

반응형

Pinch Zoom Rotate 구현하기 - 4/11 -

2013. 2. 1. 05:59 | Posted by 솔웅


반응형
Posted on . Written by



Faking Multitouch Input


파란 사각형 객체는 multiple touch input들의 recipient(받는사람) 이 될 겁니다. 이렇게 하기 위해서 우선 그 touch listener 함수를 수정해야 합니다. 우선 moved와 eneded 그리고 cancelled phases에 대해 print() 구문을 몇개 넣을 겁니다. 아래 코드는 작은 파란 사각형의 :touch() listener function을 수정한 결과 입니다.


sample4.lua

function rect:touch(e)
 
local target = e.target -- get the object which received the touch event
-- handle began phase of the touch event life cycle...
if (e.phase == "began") then
 
print( e.phase, e.x, e.y ) -- create a tracking dot
local dot = newTrackDot(e) -- we handled the began phase
return true
 
elseif (e.parent == rect) then
 
if (e.phase == "moved") then
print( e.phase, e.x, e.y )
else -- ‘ended’ and ‘cancelled’ phases
print( e.phase, e.x, e.y )
end
return true
 
end
return false -- if target is not responsible for this touch event return false
end






가장 많이 바뀐 부분은 moved,ended, cancelled phases 에 추가 된 건데요. 여기서 tracking dot들이 파란 사각형의 :touch() function을 call 하도록 하는 겁니다. event parameter 로 pass 하고 하얀 원의 touch 함수에의해 receive 되게 되죠.

elseif 구문도 중요한데요. tracking dot들이 사각형에 event parameter를 pass 한다면 e.target은 사각형이 아니라 그 dot에 대한 reference 가 될 겁니다. 이 reference 를 .parent 프로퍼티안의 사각형으로 저장할 겁니다. 이렇게 함으로서 rect:touch() function은 해당 터치 이벤트가 맞는지 안 맞는지 체크할 수 있게 됩니다. 물론 아직 원의 touch 함수가 사각형의 :touch()를 call 하도록 바꾸지는 않았습니다. 이 작업을 하기 전에 각 원이 사각형 객체에 대한 reference를 가지고 있어서 rect:touch() function를 call 하고 evnet parameter를 pass 할 수 있는지 여부를 확인해야 합니다.

아래 newTrackDot() function의 시작부분 입니다. 이 함수는 이벤트 파라미터의 원래 .target 프로퍼티에 대한 local copy 를 만들어야 합니다.


-- creates an object to be moved
function newTrackDot(e)
 
local circle = display.newCircle( e.x, e.y, 50 ) -- create a user interface object
circle.alpha = 0.5 -- make it less imposing
local rect = e.target -- keep reference to the rectangle
function circle:touch(e) -- standard multi-touch event listener
-- ...


원래의 began event phase를 receive 한 객체를 계속 reference 하는 것은 tracking dot을 multitouch event에서 해당 reference로 영향을 줄 수 있도록 합니다. 이제 began phase event parameter를 "rect"로 보내기 위한 tracking dot이 필요 없게 됐습니다. 왜냐하면 이미 이벤트를 receive 했기 때문이죠. 이제 우리가 해야할 작업은 tracking dot의 :touch() function 안의 rect:touch(e)를 call 하는 겁니다. 그렇게 하면 다른 phase들이 그 rect 객체로 보내질 수 있게 되는 것이죠.

main.lua

sample4.lua

-- standard multi-touch event listener
function circle:touch(e)
 
local target = circle -- get the object which received the touch event
circle.alpha = 0.5 -- make it less imposing
e.parent = rect -- store the parent object in the event
-- handle each phase of the touch event life cycle...
if (e.phase == "began") then
display.getCurrentStage():setFocus(target, e.id) -- set touch focus on this object
target.hasFocus = true -- remember that this object has the focus
return true -- indicate the event was handled
elseif (target.hasFocus) then -- this object is handling touches
if (e.phase == "moved") then -- move the display object with the touch
target.x, target.y = e.x, e.y
else -- "ended" and "cancelled" phases
display.getCurrentStage():setFocus(target, nil) -- remove touch focus
target.hasFocus = false -- this object no longer has the focus
end
 
rect:touch(e) -- send the event parameter to the rect object
return true -- indicate that we handled the touch and not to propagate it
end
 
return false -- if target is not responsible for this touch event return false
end


아주 간단하죠. 이제 우리는 사각형을 만들었습니다. 그 사각형은 touch 가 될 때마다 tracking dot을 생성하게 됩니다. 각 dot들은 또한 그들의 touch 정보를 그 사각형에 보내게 됩니다. 이 때 그 dot들의 original touch handler 함수를 사용하게 되는 거죠. 이 사각형은 그것이 맞는  target인지 알고 있습니다.

이 trick 을 사용함으로서 얼티터치 정보를 사용할 수 있게 됐습니다.





반응형