Not really, you just neglected the fact that Iran signed the Nuclear non prolifiration treaty and as such is bound by it. N. Korea did not, I suppose the question is "Why di Iran become a signatory"?
Iran is a signatory state of the NPT and has recently as of 2006 resumed development of its uranium enrichment program, ostensibly for its civilian nuclear energy program, as it is entitled to do under the terms of the NPT. It has been accused of reactivating this program by the United States and European Union to covertly develop an independent nuclear weapon program, in violation of the NPT. There has been some concern over the possibility of a nuclear armed Iranian state, with specific anxieties raised after controversial remarks made by Iranian president Mahmoud Ahmadinejad about the state of Israel [12]. Iran remains under investigation by the International Atomic Energy Agency, who have currently presented no evidence of a nuclear weapons program.