我制作了多个枚举,以便可以保存用户拍摄的照片,该照片显示在 UIImage 中。但是我不知道如何保存和显示在 UIImage 中的图片。我还希望用户选择他想要保存到的枚举,以便我可以将图片分类到流派中。我只想有一个起点,我现在被困住了。
-(void)setLabelTextForCategory:(MyFoodCategory)category
{
switch(category) {
case MyFoodCategoryVegetable:
self.categoryLabel.text = @"V";
break;
case MyFoodCategoryMeat:
self.categoryLabel.text = @"M";
break;
case MyFoodCategoryFish:
self.categoryLabel.text = @"P";
break;
case MyFoodCategorySweet:
self.categoryLabel.text = @"D";
break;
}
}