iOS 自定义输入键盘

1.洗牌算法用于打乱键盘
-(NSArray *)shuffle:(NSArray *)array
{
    if(array == nil || array.count < 1)
        return nil;
    NSMutableArray *resultArray = [NSMutableArray arrayWithArray:array];
    NSInteger value;
    NSNumber *median;
     
    for(NSInteger index = 0; index < array.count; index ++){
        value = rand() % resultArray.count;
        median = resultArray[index];
         
        resultArray[index] = resultArray[value];
        resultArray[value] = median;
    }
    return resultArray;
}

https://blog.csdn.net/laodeng0512/article/details/75529630 多功能键盘

https://www.jianshu.com/p/74767b7bbba2 厉害的多功能键盘不过用xib写的不太好复用

你可能感兴趣的:(iOS 自定义输入键盘)