posted by 네코냥이 2013. 2. 3. 15:38



(이미지 출처: http://starpl.com/jidolstar/11333156 )

UISegmentedControl Class Reference

Overview

UISegmentedControl object is a horizontal control made of multiple segments, each segment functioning as a discrete button. A segmented control affords a compact means to group together a number of controls.


A segmented control can display a title (an NSString object) or an image (UIImage object). The UISegmentedControl object automatically resizes segments to fit proportionally within their superview unless they have a specific width set. When you add and remove segments, you can request that the action be animated with sliding and fading effects.



You register the target-action methods for a segmented control using the UIControlEventValueChanged constant as shown below.

[segmentedControl addTarget:self
                     action:@selector(action:)
           forControlEvents:UIControlEventValueChanged];

How you configure a segmented control can affect its display behavior:

  • If you set a segmented control to have a momentary style, a segment doesn’t show itself as selected (blue background) when the user touches it. The disclosure button is always momentary and doesn’t affect the actual selection.

  • In versions of iOS prior to 3.0, if a segmented control has only two segments, then it behaves like a switch—tapping the currently-selected segment causes the other segment to be selected. On iOS 3.0 and later, tapping the currently-selected segment does not cause the other segment to be selected.



posted by 네코냥이 2013. 2. 3. 15:01

 일단, 제가 C#을 배우게 된 이유가 

.NET 기반의 웹프로그래밍이기 떄문에 시야가 좁음을 고려해주시길 바랍니다.


C# 관련 커뮤니티

- 훈스닷넷        http://www.hoons.kr/

- 태요닷넷        http://www.taeyo.pe.kr/default.aspx

- C# 코너         http://www.c-sharpcorner.com  

(해외싸이트. 최신정보를 아주쉽게 설명해줌. 자료방대)


- 개발 관련 정보를 얻는데, 커뮤니티는 정말 필수적인 곳입니다. 

모르는 정보를 무료로 답변받을 수 있는 곳이니까요.


C# 라이브러리 싸이트

- http://msdn.microsoft.com/en-us/library/aa645596(VS.71).aspx


posted by 네코냥이 2013. 2. 3. 14:45

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

# 스크립트 부분


<script type="text/javascript">

function Commend( where ) {

var object = $(where);  // 받은 인자를 바로 $안에 감싸면, JQuery 객체가 되어버린다.

var upper_Tag = where.parent();  //이벤트가 일어난 부분의 부모태그

var Title = upper_Tag.parent().find("[name=Title]").val();    

// 한번 더 상위 태그로 올라가, name 속성의 값이 Title인 객체를 찾음. 그 객체의 값

}

</script>

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

# HTML 부분

<tr>

<td>

<span name="Title"> TITLE </span>

</td>

<td>

<span onclick=" Commend(this) ">Content</span>

</td>

</tr>

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

HTML 구조에 의존적이긴 하지만, attr("id") 등의 메소드를 이용해준다면,

그 이벤트의 발생위치를 판단할 수 있고, 그에 따른 명령을 따로 처리해 줄 수 있다.