カスタムブラシのインポート

Photoshop

Photoshop カスタムブラシをインポート

Photoshop CS4

Photoshopでは、カスタムブラシという機能があり、昔は単純なブラシしかなかったのですが、今は図形を描くような機能になってきています。
カスタムシェイプのようなことができる、ということですね。

うまく使えば、あなたの描画力は格段にアップします!
なおかつ、早く作業がすんじゃいます。

下記のサイトは無料ですばらしいカスタムブラシをダウンロードできる素晴らしいサイトです。
Free Photoshop Brushes at Brusheezy!

カスタムブラシのインポートの方法です。

  1. ブラシをツールボックスから選択します。
  2. ヘッドメニューのブラシの絵がある右の下向きの小さい三角をクリック
  3. 下記のような画面が出ますが、赤い印のついている右向きの小さい三角をクリック

brush.gif

  1. 「ブラシファイルの読み込み」を選択し、上記のようなサイトでダウンロードしたブラシファイルの拡張子abrというファイルを読み込みます。

カスタムセルのUIButtonのNSIndexPathを取得する

iPhone

カスタムセルを使ってテーブルを表示しているとき、セルの選択によってではなく、カスタムセル内のボタンの選択によって画面遷移を行いたい場合があると思います。

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

これではなく・・・

 - (void)transitionBySelectedButton:(id)sender 

といった自前のメソッドで画面遷移したい。

この場合、それぞれのセルごとにボタンのタッチイベントを定義するには UIEvent を使います。
これでタッチした画面の座標を取得し、どのセルの中にあるボタンかを知ることができます。

 UIEvent
 タッチやジェスチャーをイベントに関連付けてくれます。
 すべてのタッチの座標はUITouchが持っています。

コードは以下。

 - (UITableViewCell *)tableView:(UITableView *)tableView
                     cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *cellIdentifier = kCellIdentifier;
    CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (!cell){
        cell = [[CustomCell alloc]
                           initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
    }
 
 // ボタンのタッチイベント
    [cell.button addTarget: self
                       action: @selector( selectButtonInCell: event: )
                       forControlEvents: UIControlEventTouchUpInside];
  
    return cell;
 }
 
 //
 -(void)selectButtonInCell: (UIButton *)sender event: (UIEvent *)event
 {
    NSIndexPath *indexPath = [self getIndexPathForSelectedButton: event];
    NSString *message = [NSString stringWithFormat:
                                                    @"Section is %d,  Row is %d .",
                                                        indexPath.section, indexPath.row];
    UIAlertView *alert = [[UIAlertView alloc]
                                       initWithTitle:@"You Tapped This IndexPath!!!!"
                                            message:messageString
                                            delegate:nil
                               cancelButtonTitle:@"OK"
                               otherButtonTitles:nil];
    [alert show];
 }
 
 // UIControlEventからタッチ位置のindexPathを取得する
 - (NSIndexPath *)getIndexPathForSelectedButton: (UIEvent *)event
 {
    UITouch *touch = [[event allTouches] anyObject];
    CGPoint p = [touch locationInView:self.tableView];
    NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:p];
    return indexPath;
 }
  • 各ボタンのtagの値に見て、処理を行うと、もっと楽ですかも! — 鄒 東金 {2013-02-15 (金) 13:46:02}

オートフィルター

Office2007

excel2007_3.gif

Excel2007 カラフルな表を作るで、上記のように表が作れました。

オートフィルターですが、上記の図で「商品」の右横の小さな矢印を押すと、フィルター機能になります。

一番したに、セルの内容が並びますが、一番上の「すべて選択」のチェックをはずして、たとえば「いちご」だけチェックをつけ、OKをクリックすると、「いちご」だけフィルタしてくれます。