答案 0 :(得分:3)
尝试使用 array_unshift() php函数检查here 像这样
$queue=array_merge($image_sizes, array(
'full',
) );
array_unshift($queue, " ");
return $queue;
答案 1 :(得分:0)
您可以使用array_unshift
,也可以像对待full
一样进行合并:
function photomag_image_size() {
$image_sizes = get_intermediate_image_sizes();
$image_sizes = array_merge(array(""), $image_sizes);
return array_merge($image_sizes, array('full') );
}
答案 2 :(得分:0)
再次使用$temp = array_merge($image_sizes, array('full'));
return array_merge(array("first") , $temp);
-(void)fireNotificationonDate:(NSDate *)dateEnter onTime:(NSString *)strTime
{
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSDateComponents *timeComponents = [calendar components:( NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) fromDate:dateEnter];
[timeComponents setHour:[strTime integerValue]];
[timeComponents setMinute:00];
[timeComponents setSecond:0];
[timeComponents setYear:[timeComponents year]];
[timeComponents setMonth:[timeComponents month]];
[timeComponents setDay:[timeComponents day]];
NSDate *dtFinal = [calendar dateFromComponents:timeComponents];
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"];
NSString *fierDate = [formatter stringFromDate:dtFinal];
NSLog(@"%@",fierDate);
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.fireDate = dtFinal;
notification.alertBody = @"";
notification.timeZone = [NSTimeZone defaultTimeZone];
notification.soundName = UILocalNotificationDefaultSoundName;
notification.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
}