أهداف الدرس
- أن تعرف حالات التطبيق.
- أن تحفظ عمل المستخدم قبل أن يوقفه النظام.
- عند التشغيل: حمّل ما حُفظ آخر مرة.
- في المقدّمة: اعرض وحدّث.
- قبل الخلفية: احفظ المسودّة فوراً.
- بعد التوقّف: لا تفترض أن شيئاً بقي في الذاكرة.
تمرين
لماذا لا ننتظر إغلاق التطبيق لنحفظ؟
الإجابة
لأن النظام قد يوقف التطبيق من الخلفية دون أي إشعار.
Lesson goals
- Know the app's states.
- Save the user's work before the system stops the app.
- On launch: load what was saved last time.
- In front: show and refresh.
- Before the background: save the draft at once.
- After a stop: assume nothing is left in memory.
Exercise
Why not wait until the app closes to save?
Answer
The system may stop a background app without any notice.
التعليقات / Comments
لا تعليقات بعد. كن أول من يسأل. / No comments yet. Be the first to ask.