开发者

Simple binding questions

开发者 https://www.devze.com 2023-01-27 06:20 出处:网络
I am trying a simple application which is like this- View: A table view showing count of entity 1 in first column and count of entity 2 in second column. Here each row specifies count of different

I am trying a simple application which is like this-

View:

  1. A table view showing count of entity 1 in first column and count of entity 2 in second column. Here each row specifies count of different entities at a particular date.

  2. A text field showing- total count of entity 1 multiplied by 35.

  3. A text field showing- sum of count of entities in both the columns.

eg.

(entity1) (entity2)

<2> <3>

<4> <2>

<5> <7>

requirement 1: text field specified in pt. 2 should show - 385 ie. (11 * 35)

开发者_Go百科requirement 2: text field specified in pt. 3 should show - 23 ie. (11 + 12)

Model:

An object with two properties:

int entity1Count

int entity2Count

I am using an array controller object to show data in table view.

My question is -

Can I implement my requirements via bindings in IB? If yes then how?

Thanks,

Miraaj


I am able to implement requirement 1, via bindings in IB using NSNumberFormatter and its multiplier property :)

but I am still unable to implement requirement 2 :(

Any suggestion ?

Thanks,

Miraaj

0

精彩评论

暂无评论...
验证码 换一张
取 消