for (int i = 0; i < _selectedImageIndices.count; i ++) {
         for(int j = 0; j < mCurrentPictureList.count; j++) {
             if( [mCurrentPictureList[j] isEqual: (NSObject *)_selectedImageIndices[i] ])
             NSLog(@"%@ as the same as %@", [mCurrentPictureList[j] id_atch_file], [((MyObject *)_selectedImageIndices[i]) id_atch_file]);
             else {
                 MyObject *temp = (MyObject *)_selectedImageIndices[i];
                 NSLog(@"NOT EQUAL%@ %@", [mCurrentPictureList[j] id_atch_file], [ id_atch_file]);
                                  }
          }
     }


 unrecognized selector sent to instance 

임베디드 처럼 객체 변환이 자유롭지는 않다. 메모리를 직접 다루는 것은 아니면서 애매한... 불편.

Can't end BackgroundTask: no background task exists with identifier 2 (0x2), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

applicationDidEnterBackground
2020-01-03 09:02:34.980763+0900 [285:7451] Can't end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
2020-01-03 09:02:35.976769+0900 [285:7451] applicationWillEnterForeground
2020-01-03 09:02:36.273989+0900 [285:7451] applicationDidBecomeActive


StackOverflow bubble sort

- (NSArray *) bubbleSort:(NSArray *) arrayToBeSorted ascendingOrder:(BOOL) sortInAscendingOrder {
    // As we can't swap integers in a static array, make a mutable array out of the given static array.
    NSMutableArray *muArrRaw = [[NSMutableArray alloc] initWithArray:arrayToBeSorted];

    BOOL swapped;
    NSUInteger n = [muArrRaw count];
    // iterate through the array as rounds
    do {
        swapped = NO;
        // iterate through each element of the array with the given range
        for (NSUInteger j = 0; j + 1 < n; j++) {
            // comparison
            if (sortInAscendingOrder && [muArrRaw[j] compare:muArrRaw[j+1]] == NSOrderedDescending) {
                [muArrRaw exchangeObjectAtIndex:j withObjectAtIndex:j+1];
                swapped = YES;
            } else if (!sortInAscendingOrder && [muArrRaw[j] compare:muArrRaw[j+1]] == NSOrderedAscending) {
                [muArrRaw exchangeObjectAtIndex:j withObjectAtIndex:j+1];
                swapped = YES;
            }
        }
    } while (swapped);

    // return the sorted array
    return [muArrRaw copy];
}


NSArray *ns = [self bubbleSort:your_Mutable_array ascendingOrder:YES];

역시 버블. 성능 ㄲㅈ


 Attachment *data = [mCurrentPictureList objectAtIndex:indexPath.row];
    
    NSString *path = [FileManager getDirImage];
    NSString *filePath = [path stringByAppendingPathComponent:data.file];
    [btnImg setBackgroundImage:[UIImage imageWithContentsOfFile:filePath] forState:UIControlStateNormal];
    [btnImg addTarget:self action:@selector(clickImg:) forControlEvents:UIControlEventTouchUpInside];


저는 직장 생활 전부터 지금까지 부사장께도 늘 바른말을 하려고 노력 했었던 것 같습니다.
그 덕에 KBS1 라디오에 출연했는데, http://www.podbbang.com/ch/16839
작년 3월 28일 이며, “삼성” 으로 검색하시면 바로 찾을 수 있습니다.



'Blog History' 카테고리의 다른 글

074  (0) 2020.01.09
073  (0) 2020.01.09
071  (0) 2020.01.04
070  (0) 2019.12.31
069  (0) 2019.12.28

+ Recent posts