buildNumber=$(git rev-list HEAD --count)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Category: Заметки
Кратко об указателях
int х = 1, y = 2, z[10];
int *ip; /* ip - указатель на int */
ip = &x; /* теперь ip указывает на х */
y = *ip; /* у теперь равен 1 */
*ip = 0; /* х теперь равен 0 */
ip = &z[0]; /* ip теперь указывает на z[0] */
UITableView separator inset
- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (uslovie1) // удаляет inset, делает от начала до конца
{
// Remove seperator inset
if ([cell respondsToSelector:@selector(setSeparatorInset:)])
{
[cell setSeparatorInset:UIEdgeInsetsZero];
}
// Prevent the cell from inheriting the Table View's margin settings
if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)])
{
[cell setPreservesSuperviewLayoutMargins:NO];
}
// Explictly set your cell's layout margins
if ([cell respondsToSelector:@selector(setLayoutMargins:)])
{
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
if (uslovie2) // прячет separator
{
cell.separatorInset = UIEdgeInsetsMake(0.f, cell.bounds.size.width, 0.f, 0.f);
}
}
Генерация pem из cer (для apns)
openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts
PHP Рандомная строка
substr(str_shuffle(MD5(microtime())), 0, 32);